Question
Synechron Inc.
US
Last activity: 7 Nov 2016 13:43 EST
To select a particular option in a select list
Hi Jeff,
I want to select a particular option in a select list. Can you let me know about the way to deal with that while automating.
Thanks and Best Regards,
Madhukar Ganesh Chatra
***Updated by Moderator: Vidyaranjan| Updated Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hello Jeff,
Thanks for posting your query in PSC. :)
Could you verify if below posts helps at your end:
- https://collaborate.pega.com/discussion/rest-service-integration-guide-tutorial
Regards,
Rincy
Synechron Inc.
US
Thank you for your response. I need select one of the element in between <Select> <option> </option> </select> tags and I used SelectItemByIndex/ name / value but its not working.
Kindly let me know if know solution for this problem.
Regards,
Madhukar Ganesh Chatra
Pegasystems Inc.
US
Please share some html that demonstrates the list. Every web page has its own nuances. Have you tried setting the Text of the control?
Synechron Inc.
US
Hi Jeff,
The html code for list is below and I tried using SelectItemByIndex/Value/Text to select my option in list, but that’s not working.
<select name="cboSearchBy" tabindex="1" class="content" id="cboSearchBy" style="left: 10px; top: 25px; width: 120px; height: 70px; position: absolute; z-index: 200;" size="6" type="select-one" namedby="lblcboSearchBy" _valuefld="SEARCH_TYPE" _descfld="SEARCH_TYPE" datafld="SEARCH_TYPE">
<option value="C">Name - Personal</option>
<option value="B">Name - Business</option>
<option value="T">TIN</option>
<option value="A">Account Number</option>
<option value="P">Party ID</option>
</select>
Regards,
Madhukar Ganesh Chatra
Pegasystems Inc.
US
I just created a html page using the Select code you provided. I am able to use SelectItemByText to select the item I desire with no trouble. The text must match exactly however. What does your automation look like?
Synechron Inc.
US
Hi Jeff,
Even It's working for me when I create separate html page for Select code alone. But it doesn't work when i try to interrogate with the whole application that contains the select list. Kindly help me out to find the root cause of the probelm. I have also attached the screenshot of the automation.
Thanks and Best Regards,
Madhukar Ganesh Chatra
Pegasystems Inc.
US
Does execution actually get to the SelectItemByText? Without access to the application it is pretty hard to troubleshoot. It could be a matching issue, there could be some Javascript playing havoc with your selection, or something else. If you look in the logs what do you see?
Tetrasoft India Private Limited
IN
Hi Madhukar,
To seclude the issue seen in whole application as of now, you may analyse the tracer logs while running your use case.
Is there any error seen there?
Synechron Inc.
US
Hi Dames,
I am not able to see any errors and does Javascript running in background, can cause the problem with the matching rules, because I have perfectly matched the controls but still it says required control is un-matched.
Thanks and Best Regards,
Madhukar Ganesh Chatra