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.
Cannot populate field
Hello everyone,
I'm trying to put value in to the imput, i using _setValue and _type commands but non of them working.
This is the element im trying to populate:
<input type="text" class="middle ui-autocomplete-input ui-widget ui-widget-content" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true" placeholder="Country" id="cb_country_selector-country">
i tried:
_setValue(_textbox("cb_country_selector-country"), "z");
_setValue(_byId("cb_country_selector-country"), "z");
what else can i try ?
I'm trying to put value in to the imput, i using _setValue and _type commands but non of them working.
This is the element im trying to populate:
<input type="text" class="middle ui-autocomplete-input ui-widget ui-widget-content" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true" placeholder="Country" id="cb_country_selector-country">
i tried:
_setValue(_textbox("cb_country_selector-country"), "z");
_setValue(_byId("cb_country_selector-country"), "z");
what else can i try ?
Comments
API _type(element, text)
Notes Types the text into the element. Different from _setValue.
_type does not bring or remove focus from element. Rarely used.
Unexpected problem with a Login Form - Sahi records just like the PDF help examples.
But playing back acted totally UNresponsive, dead, silent, no change, failed UNTIL ...
final Success when I replaced the _setvalue and _click statements with the _type statements below. Note, I could only "click" the Submit button by _type(ing) a space "in" it.