In order to perform mouse and keyboard actions, Selenium WebDriver has Actions class. Suppose if we want to double click an element, we'll have code like following -
Actions builder=new Actions(driver);
builder.doubleClick(visibleElement).build().perform();
Same we can have without build()
method like -
builder.doubleClick(visibleElement).perform()
For both, I saw same behaviour. Could you please help to understand how it impacts actions with and without build()
method.
In existing tests, suppose I've actions without build()
and now I use it or I have tests with build()
and now I remove it, how will it affect test execution behaviour?