Actions class in Selenium-Webdriver
=> An API for simulating complex keyboard events and mouse events.
=> You can build a series of actions using the Action interface and Actions class.(Action chaining)
eg:- To copy content in clipboard
Actions builder = new Actions(driver);
builder.keyDown( Keys.CONTROL ).sendKeys( "ac" ).keyUp( Keys.CONTROL ).build().perform();
=> This is possible because methods of Actions class returns the Actions class object.
=> build() of Actions class compiles all events and returns object of Action interface.
=> perform() of Action interface executes all events.
Comments
Post a Comment