google chrome - Exception in thread "main" java.lang.IllegalStateException: in selenium -
following code:
import org.openqa.selenium.webdriver; import org.openqa.selenium.chrome.chromedriver; import java.util.concurrent.timeunit; import org.openqa.selenium.by; public class browser { public static void main(string args[]){ webdriver driver= new chromedriver(); driver.manage().timeouts().implicitlywait(10, timeunit.seconds); driver.get("https://q-apis-two.iot-build.qa.covapp.io/#/dashboard"); driver.manage().window().maximize(); driver.findelement(by.id("user")).sendkeys("q-apis-two_admin"); driver.findelement(by.id("password")).sendkeys("covisint111"); driver.manage().timeouts().implicitlywait(60,timeunit.seconds); driver.findelement(by.classname("btn btn-lg btn-primary btn-block")).click(); driver.close(); } }
it throws following error: exception in thread "main" java.lang.illegalstateexception: path driver executable must set webdriver.chrome.driver system property; more information, see https://github.com/seleniumhq/selenium/wiki/chromedriver. latest version can downloaded http://chromedriver.storage.googleapis.com/index.html
i new selenium kindly guide me please
you missed chromedriver
path
system.setproperty("webdriver.chrome.driver", "e:\\sankalp\\my_selenium\\chromedriver.exe"); //then code webdriver driver= new chromedriver(); driver.manage().timeouts().implicitlywait(10, timeunit.seconds); driver.get("https://q-apis-two.iot-build.qa.covapp.io/#/dashboard"); driver.manage().window().maximize(); driver.findelement(by.id("user")).sendkeys("q-apis-two_admin"); driver.findelement(by.id("password")).sendkeys("covisint111"); driver.manage().timeouts().implicitlywait(60,timeunit.seconds); driver.findelement(by.classname("btn btn-lg btn-primary btn-block")).click(); driver.close();
please change path store chromedriver.exe
Comments
Post a Comment