How to Select Apex list

Dear please help . I am unable to find solution for this. I am using the following Codes for selecting value in the id=“P40_LC_ID”. But it is not going so.
1.txt (731 Bytes)
2 html.txt (27.3 KB)

Perhaps you can try an experiment where you comment out your current “setText” statement and put in something like:

	 xpath = 'id("P40_LC_ID")'
	 myItem = new TestObject(xpath)
	 myItem.addProperty('xpath', ConditionType.EQUALS, xpath)
	 WebUI.verifyElementVisible(myItem)

	 WebUI.setText(myItem, "301")   // change to enter specific text
	 WebUI.verifyElementAttributeValue(myItem, "value", "301", 10)

This may show you if you have a concern with the spreadsheet or the element.

And for your “Select Apex list”, do you have to click on the “Create” link before you start entering data into the form?

for (row = 1; row <= data.getRowNumbers(); row++) {

	xpath = '//a[text()="Create"]'
	createButton = new TestObject(xpath)
	createButton.addProperty('xpath', ConditionType.EQUALS, xpath)
	WebUI.verifyElementVisible(createButton )
	WebUI.click(createButton )
	WebUI.waitForPageLoad(10)

xpath = ‘id(“P40_LLCA_ID”)’ I am trying to select data in this tab actually. But as this tab data is dynamic. Some time here may have only one data some time may more than two data I have to select the data according to the value of excel (B2). I am try to use selectOptionByIndex/Value/Label but it is not going on.

I see in the code the values of the options, however, are you aware of how to select an item? If I just click on the drop-down, nothing shows, so is there a specific sequence of steps?

When I set data from excel(data from excel A2) in xpath = ‘id(“P40_LC_ID”)’ then it will show some data in xpath =‘id(“P40_LLCA_ID”)

Dear Sorry for being late. In xpath = ‘id(“P40_LC_ID”)’ the first data of excel “1471230300092” will set then in xpath =‘id(“P40_LLCA_ID”) i will need to click one so that the apex list appear. then i will need to select the value according to the excel file (There might be many values in list but have to select according to the excel value) here like"14,805.23".
RRR1.xls (29.5 KB)

Just a quick question. Can you get the “select” to work if you do the test manually (without KS script)?

Please help me @grylion54

Not much I can do with the source you have given. I have tried your id manually and via script and nothing happens. Maybe someone else with more Apex experience can assist.

Do you do a click event on the drop-down before you see the list? Then do that in code.

When the drop-down appears manually, RIGHT click on it and select “Inspect”. You might have to do this twice. I can see the tag for the drop-down is a select, but see if the two items in your image are options of the select.

1 Like