I need to set value to primefaces or JSF selectOneMenu using webdriver.
I am able to achieve this using index but could not set value directly.
The following code is working with Index:
driver.findElement(By.name("LNSYNDGLP0_SL_CCY_editableInput")).click();
driver.findElement(By.xpath("//div[#id='LNSYNDGLP0_SL_CCY_panel']/ul/li[7]")).click();
Could anybody please suggest a way to achieve setting value to selectonemenu using Selenium webdriver?
You can use the [text()='item value'] selector in XPath to select the element by its node value.
driver.findElement(By.xpath("//div[#id='LNSYNDGLP0_SL_CCY_panel']/ul/li[text()='item value']")).click();
Related
I'm trying to validate a multiple ui-select using ng-messages and angular 1.3. The $touched property is not being set on first interaction, i.e. click inside the select and then click outside. However, this works for textarea element.
Including the plnk. Could someone say what is wrong here? TIA.
Seems like it's just a bug in 1.3 since 1.4.7 behaves how you'd expect. The ng-touched and ng-untouched classes on the input box are updating correctly, so that could be a workaround in some cases.
I am trying to implement a dropdown+textbox kind of element in UI. Was using rich:autocomplete to achieve that. It worked, with one issue.
The client requirement is that the textbox should be able to take new values in it. i.e. If the values values are in the dropdown, it will take the dropdown values, otherwise it will take the new values entered.
Is there anyways to achieve that using rich:dropdown? Any other suggestion are also welcome. My application is using JSF2.0 + Richfaces 4.3.4.
Looking at your requirement I can suggest you can use tag input widget, see the reference link url:http://jquery-plugins.net/tag/tag-input
I flipped through two RichFaces reference guides and did not find this information. Where else can I search for it?
List of possible attributes of f:ajax tag. If one belives Luiggi Mendoza, this list is the same as in a4j:ajax.
I am unable to set value of text, radio and other form elements based on a select element onchange.
All form elements are part of the same form.
The values to be set are to be fetched from database table without refreshing/redirecting the whole page (may be using Ajax).
Solution should be MVC based. I am a ZF novice.
Made it work with the help of following link:
http://zendgeek.blogspot.in/2009/07/ajax-with-json-and-prototype-in-zend.html
I used JQuery $.ajax() in place of prototype.js Ajax.Request() as the latter was conflicting somewhere with a datepicker element and I thought why to include one more js file when already JQuery is there.
I am using JSF 2 with PrimeFaces 2.2. I tried making an ajax call through a select box onchange event in a dataTable. I was able to see the System.outs printing but, I could not see the components given in the update attribute getting updated. I have given the dataTableId in the update attribute.
I guess the problem now is the selectbox is getting populated again and an ajax call is made. Should we give only the parent tags in the update attirbute, for the ajax call to work. Please help me out in this.
When the ID in the update attribute does not start with :, it becomes relative to the ID of the current component inside the same NamingContainer component. But since the h:dataTable is an NamingContainer component, you need to reference it by an absolute ID. Rightclick the JSF page in the webbrowser and choose View Source to see the generated HTML DOM tree. Locate the HTML <table> element which is generated by the <h:dataTable>, determine the value of its id attribute and use exactly that id in the update attribute, prefixed with :.