Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is the use of JavaScriptExecutor?

Category: Selenium WebDriver

JavaScriptExecutor is an interface which provides a mechanism to execute Javascript through the Selenium WebDriver. It provides “executescript” and “executeAsyncScript” methods, to run JavaScript in the context of the currently selected frame or window. An example of that is:

JavascriptExecutor js = (JavascriptExecutor) driver; 
js.executeScript(Script,Arguments);

Leave a Reply

Your email address will not be published. Required fields are marked *