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.
auto complete select all in the list
In our application , if we typed a letter like kor ,the name starts with kor was listing, i want to select the all the restaurants and locations.
this is inspect elecment
div id="Autocomplete_6e1b3" class="autocomplete" style="display: block; width: 484px; max-height: 400px; padding: 3px;">
<div class="selected" title="Koral">
<div class="category"> Restaurants </div>
<strong>Kor</strong>
al
</div>
<div title="Koramangala" class="">
<div class="category"> Locations </div>
<strong>Kor</strong>
amangala
iam using this code;--
_focus(_textbox("main_search_box"));
_setValue(_textbox("main_search_box"), "kor");
var $a=_collect("_title", "/./", _in(_div("Restaurants")));
for (var $i=0; $i<$a.length; $i+=1) {
_click($a[$i]);
_click(_button("SEARCH"));
var $b=_collect("_title", "/./", _in(_div("Locations")));
for (var $j=0; $j<$b.length; $j+=1) {
_click($b[$j]);
_call(history.back());
}
}
iam facing a problem fom yesterday....plzz help me
url:---justeat
this is inspect elecment
div id="Autocomplete_6e1b3" class="autocomplete" style="display: block; width: 484px; max-height: 400px; padding: 3px;">
<div class="selected" title="Koral">
<div class="category"> Restaurants </div>
<strong>Kor</strong>
al
</div>
<div title="Koramangala" class="">
<div class="category"> Locations </div>
<strong>Kor</strong>
amangala
iam using this code;--
_focus(_textbox("main_search_box"));
_setValue(_textbox("main_search_box"), "kor");
var $a=_collect("_title", "/./", _in(_div("Restaurants")));
for (var $i=0; $i<$a.length; $i+=1) {
_click($a[$i]);
_click(_button("SEARCH"));
var $b=_collect("_title", "/./", _in(_div("Locations")));
for (var $j=0; $j<$b.length; $j+=1) {
_click($b[$j]);
_call(history.back());
}
}
iam facing a problem fom yesterday....plzz help me
url:---justeat
Comments
And if you would have looked at the html source, you might have found out, that there are no things like _title in your autocomplete. I would recommend you _collect the _strong forms. This way you can't differentiate between restaurants and locations in the autocomplete, but you will get everything.
_focus(_textbox("main_search_box"));
_setValue(_textbox("main_search_box"), "kor");
var $a=_collect("_div", "/./", _in(_div("autocomplete")));
for (var $i=0; $i<$a.length; $i+=1) {
_alert($a[$i].title);
url:---justeat.in
if we typed a letter like kor ,the name starts with kor was listing, i want to select the all the restaurants and locations one by one..............
plzzz give the solution