18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
_select value?/return all objects in the page?/how object spy works?
Hi Narayan,
Thank you again for answering my previous question. I have another problem that i am encountering on the _select function, this is my question:
<select id="dropid" name="dropname">
<option value="AA">Age</option>
<option value="BB">Name</option>
<option value="CC">Address</option>
<option value="DD">Zip Code</option>
1. Is it possible to select value attribute? like this one?
_setSelected(_select(“dropname”), “AA”); // and i will get the Age?
2. Is there a way that i could get all the object from the page on how they are displayed (in-order) and put them in an array?
3. How Object spy works? is it the same as object spy in QTP?
Thanks again!
Best regards,
Jeff
Thank you again for answering my previous question. I have another problem that i am encountering on the _select function, this is my question:
<select id="dropid" name="dropname">
<option value="AA">Age</option>
<option value="BB">Name</option>
<option value="CC">Address</option>
<option value="DD">Zip Code</option>
1. Is it possible to select value attribute? like this one?
_setSelected(_select(“dropname”), “AA”); // and i will get the Age?
2. Is there a way that i could get all the object from the page on how they are displayed (in-order) and put them in an array?
3. How Object spy works? is it the same as object spy in QTP?
Thanks again!
Best regards,
Jeff
Comments
1) You can use regular javascript to do that:
_call(_select(“dropname”).value = “AA”);
2) We do not have anything inbuilt to do that right now, but it sounds like a useful feature.
3) Sahi uses javascript events to pinpoint a DOM element. Sahi then does some processing to intelligently identify it. This is all done on the browser (using javascript). I am not sure how QTP's Object Spy works.
Regards,
Narayan
Need you help on this topic again.
Is it possible to read the value based on an array position.
Reason being the select value will be loaded dynamically . So it will not be possible for me to know the text . But i have to select a value in some position say i .
Regards
Rajesh .R
_setSelected(_select(“dropname”), index);