How can i swich to iframe inside form ?no such element: Unable to locate element: {"method":"css selector","selector":"[id="cboItem_cboItem_Input"]"} - element

How can I switch to "iframe" inside form ? Whenever I write any program it is saying elements not intractable.
[Elements]
https://i.stack.imgur.com/Tvrmm.png
[Code in selenium]
https://i.stack.imgur.com/mNuhj.png

Related

LWC how to remove a DOM element that is rendered by another lightning component?

For example I use in a LWC that I build.
Is it possible to remove an element (for example ) that exists only after is rendered?
I tried to use query selector inside my .js file:
this.template.querySelector('h3');
But I can't find the target element this way.

prevObject returned when selecting an element

So I'm making some elements in my js file as follows:
grocerySpan = $("<span>").addClass("grocery").html(grocery.name).attr('id',"page"+groceriesIdCounter);
My first question is whether it is ok that I am assigning id as i did in the line above (using string concatenating)?
I have different spans made with each their own id, #page0, #page1..., now when I try selecting the a specific span as follows:
var tempGrocerySpan = $("span"+"#page"+groceriesIdCounter+".grocery");
I get a prevObject returned.
now here is a screenshot of my DOM from
chrome debugger
As I read a prevObject means that the selector can't find the current element selected, but as I can see from chrome debugger my selecter and the element selector are the same, or am I overseeing something?
Thanks for the help.

libreoffice base macro parametric open close get current form name

libreoffice Base 4.3.3.2
Opening a Form page by name and then close the current page form like this work:
oForm = ThisDatabaseDocument.FormDocuments.getByName("SecondForm")
oForm.Open
oFormC = ThisDatabaseDocument.FormDocuments.getByName("CurrentForm")
oFormC.Close
but is there a way to close oFormC without writing by hand his name?
trying with:
oFormC = Event.Source.Model.Parent
oFormC = ThisDatabaseDocument.FormDocuments.getByName(Event.Source.Model.Parent)
oFormC = getParent()
return an error of var not set
Can't find any help in documentation.
The term 'form' in LibreOffice/OpenOffice is confusing because it refers both to the entire document (typically a Writer file) and also to each group of form controls inside that document. So each form document can have many forms (meaning a group of controls) inside it, and forms (groups of controls) can have sub-forms.
This code gets a form document (a Writer file embedded inside a Base file):
oDoc = ThisDatabaseDocument.FormDocuments.getByName("SecondForm")
This code gets the form that is a group of controls and that contains the control which triggered the macro: oForm = Event.Source.Model.Parent
Another way to get a group of controls inside the form document in which the macro was triggered: oForm = ThisComponent.drawpage.forms.MainForm
Replace "MainForm" with your actual form name - form here meaning a group of controls. You can see the names of forms and subforms that are inside a form document by opening the Form Navigator window. Make sure the toolbar Form Design is visible; the Form Navigator icon is the sixth from the left or top, looks like a rectangle with a compass in the upper right corner.
You may have guessed from the previous code how to close the document that is active when the macro is triggered:
ThisComponent.close

HTML::Template::Pro: do something on second run of a loop

I am using HTML::Template::Pro in my perl application. I am displaying HTML elements in a loop and I want to show something after the second element of the loop. I added the loop_context_vars in my HTML::Template::Pro initialization, getting access to variables inside the loop (like __counter__).
Now I am looking for a way to check for a specific iteration of this loop to insert my HTML element.
<TMPL_IF __counter__ == 2>
My new HTML element.
</TMPL_IF>
How can I access the __counter__ variable inside conditional statements in HTML::Template::Pro?
In HTML::Template::Pro, you can use expressions like in HTML::Template::Expr
<TMPL_IF EXPR="__counter__ == 2" >
My new HTML element.
</TMPL_IF>

GWT Query selector not working

GWT Query selector i.e. $("#id") not working inside callback function. However xyz.find("#id") works, where xyz -> Gquery variable. Is it that callback function doesn't support $ selector or is there some other problem.
Are you sure that the element with id "id" is attached to the dom when the callback function is called ?
When you execute $("#id"), gQuery try to find elements matching the selectors within the set of elements of the DOM tree .
When you execute xyz.find("#id"), gQuery try to find elements matching the selectors inside the array of elements selected by xyz no matter the elements are still or not in the dom tree.