java - Is it possible to imitate keyboard behaviour with selenium? -


this question has answer here:

im automating , 1 thing have issue auto-complete dropdown im sending string key to, need choose drop down value select it, , have click on it.

so wanted know if possible after im sending key to:

go down 1 time (with "down" arrow in keyboard)

then

click enter

is possible?

i can use java or scala

thanks

yes can following code :

webelement element = driver.findelement(by.id(""); //here give id of element & can sendkeys if require element.sendkeys(keys.down); // press down key element.sendkeys(keys.enter); // press enter key 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -