Search code examples
rseleniumselenium-webdriverkeyboardrselenium

How to send simultaneous keys in RSelenium ALT+S to web driver?


I would like to send two simultaneous keys such as ALT+S to the sendKeysToActiveElement( function of the R Selenium webdriver. I only see implementations in Java and C. Can this be done?


Solution

  • Use below code :-

        String selectAll = Keys.chord(Keys.ALT, "s");
        driver.findElement(By.xpath("YOURLOCATOR")).sendKeys(selectAll);
    

    Hope it will help you :)