简体   繁体   中英

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 :(

driver.keys('Enter');

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM