i need to select the first element from an autocomplete search box , when autocomplete shows its hover other element,so other element not clickable by protractor , solution
element.all(by.css('[ng-model="address"]')).get(0) is not work for me but work in another computer ,
same script work in another computer ,
i checked protractor version , selenium version
i also try element.all(by.css('[ng-model="address"]')).first() ;
its also not work for me ,
do you have any idea how cant i get first element ?.
thanks
you can send enter key
protractor.Key.ENTER
yourelement.sendKeys('your text to send ', protractor.Key.ENTER);
The Autocomplete List is only visible if a curser is over the element.
this.selectFirstElement = function(element){
browser.sleep(3500);
browser.driver.actions().mouseMove(element);
element.sendKeys(protractor.Key.ARROW_DOWN);
element.sendKeys(protractor.Key.TAB);
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With