What is JavaScriptExecutor in Selenium?

What is JavaScriptExecutor?JavaScriptExecutor is an interface which provides mechanism to execute Javascript through selenium driver. It provides “executescript” & “executeAsyncScript” methods, to run JavaScript in the context of the currently selected frame or window.  Lets inject Javascript into Browser using Selenium Why we use it?To enhance the capabilities of the existing scripts by performing javascript […]