Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nodejs selenium webdriverio webdriver.key(ENTER)

I have try hard to search this before asking the question without susscess. I only need to know how to send special characters (enter key, backspace etc) with nodejs (webdriverio) selenium.

With python I need to import selenium.keys and then do Keys.ENTER but I dont know how to proceed with javascript. My script is completed and working except for the need to press enter on some point of it and I am unable to find the way.

I have tryied with

driver.click("#X20").then(function(res){
            driver.keys(driver.Key.RETURN);
            driver.sendKeys(driver.Key.RETURN); ///and (just testing)


        })

None of it working :(

like image 666
Noel Carcases Avatar asked Mar 22 '26 19:03

Noel Carcases


1 Answers

driver.keys('Enter');

is working :D thanks to all that take time reading my question

like image 190
Noel Carcases Avatar answered Mar 25 '26 09:03

Noel Carcases



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!