Home > Enterprise >  org.openqa.selenium.JavascriptExecutor could be resolved
org.openqa.selenium.JavascriptExecutor could be resolved

Time:07-31

I was trying to insert a js code into a website using selenium.

I know that I want to use the following import statement,

import org.openqa.selenium.JavascriptExecutor

But this was not installed,

"org.openqa.selenium.JavascriptExecutor" is not accessed
Import "org.openqa.selenium.JavascriptExecutor" could not be resolved

where to install the module or how to resolve the problem

CodePudding user response:

You have tagged and using the Selenium-Python clients you don't require any additional import other then from selenium import webdriver as both the methods to execute JavaScript synchronously and asynchronously i.e.

are supported out of the box.


Where as incase you are using the Selenium-Java clients you additionally need to import:

import org.openqa.selenium.JavascriptExecutor;
  • Related