6

My code is not launching browser.
Project show running for a long time, but nothing happens. I pushed print and observed that WebDriver driver = new ChromeDriver(); is not getting executed.

package seleniumautomation; import org.openqa.selenium.*; import org.openqa.selenium.chrome.ChromeDriver; public class seleniumautomation { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver","D:/selenium_java/chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.navigate().to("https://www.zaakpay.com/"); } } 

After some debugging, I am getting this new error: enter image description here

I added manifest_vesion, but in every run, it is generating a new file and i am again getting same error.

3

7 Answers 7

1

Use following code snippet to launch chrome driver.

System.setProperty("webdriver.chrome.driver", PATH_TO_EXE_FINAL); ChromeOptions opt = new ChromeOptions(); opt.addArguments("disable-extensions"); opt.addArguments("--start-maximized"); WebDriver driver = new ChromeDriver(opt); 
    0

    Download jar from: http://chromedriver.storage.googleapis.com/index.html?path=2.23/

    System.setProperty("webdriver.chrome.driver", "<Downloaded file location>"); WebDriver driver = new ChromeDriver(); driver.get("https://www.zaakpay.com/"); 

    Then, it will work.

    0
      0

      To use Chrome Browser needs to System.setPropert("webdriver.chrome.driver","PATH")

      The ChromeDriver is maintained / supported by the Chromium project iteslf. WebDriver works with Chrome through the chromedriver binary.

      Download Link of ChromeDriver : LINK

      2
      • System.setProperty("webdriver.chrome.driver","D:\\selenium_java\\chromedriver.exe"); Use this codeCommentedSep 6, 2016 at 9:09
      • still not working, nothing is showing in eclipse console. Is their any other logging, where i could debug the issue.CommentedSep 6, 2016 at 9:12
      0

      You need to add chromedriver.exe(can be downloaded from http://www.seleniumhq.org/download/) to your project. Along with it, you need to add following lines in your code:

      System.setProperty("webdriver.chrome.driver", PATH_TO_EXE_FINAL); capabilities= DesiredCapabilities.chrome(); capabilities.setBrowserName(DesiredCapabilities.chrome().getBrowserName()); 
        0

        I solved the issue by changing my OS windows 10 language to english. selenium methods can not execute some other languages. If in both IE, geckodriver and chrome you are having the same issue it is language problem I can asuure you

          0

          a log line showing the version of the chromedriver, as well as other info like IP, branch+commit, etc

          Trying to check the version you installed in web driver and the version you currently use in you chrome.

          1
          • 1
            Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
            – CommunityBot
            CommentedOct 29, 2021 at 10:32
          0

          I needed:

          brew upgrade chromedriver xattr -d com.apple.quarantine /usr/local/bin/chromedriver 

            Start asking to get answers

            Find the answer to your question by asking.

            Ask question

            Explore related questions

            See similar questions with these tags.