0

Here is the error:

[11762:11762:0801/141204:ERROR:url_pattern_set.cc(240)] Invalid url pattern: chrome://print/* getrlimit(RLIMIT_NOFILE) failed [11762:11886:0801/141205:ERROR:get_updates_processor.cc(243)] PostClientToServerMessage() failed during GetUpdates getrlimit(RLIMIT_NOFILE) failed

Code :

public class FirstTestCase { 
  public static void main(String[] args) throws InterruptedException {  
   // TODO Auto-generated method stub
   System.setProperty("webdriver.chrome.driver", "/usr/bin/google-chrome"); 
   WebDriver driver = new ChromeDriver(); 
   String URL = "mail.google.com";;
4
  • 1
    How to create a Minimal, Complete, and Verifiable example Commented Aug 1, 2016 at 9:21
  • Please share you code Commented Aug 1, 2016 at 9:43
  • public class FirstTestCase { public static void main(String[] args) throws InterruptedException { // TODO Auto-generated method stub System.setProperty("webdriver.chrome.driver", "/usr/bin/google-chrome"); WebDriver driver = new ChromeDriver(); String URL = "mail.google.com"; Commented Aug 1, 2016 at 9:46
  • 2
    Selenium-Chrome setup This might be helpful Commented Aug 1, 2016 at 15:37

1 Answer 1

1

There are two problem in your provided code :-

  • You are setting webdriver.chrome.driver with installed chrome location which wrong. you need to download latest chrome driver zip from here and put at any location in your machine and extract that zip and set found chromedriver to the system property with variable webdriver.chrome.driver.

  • You are providing wrong URL to launch, You should provide URL with http:// or https://.

So the working example are as below :-

public class FirstTestCase { 
  public static void main(String[] args) throws InterruptedException {  
   System.setProperty("webdriver.chrome.driver", "path/to/downloaded chromedriver"); 
   WebDriver driver = new ChromeDriver(); 
   String URL = "https://www.google.com";
   driver.get(URL);
  }
}

Hope it works..:)

Sign up to request clarification or add additional context in comments.

7 Comments

@muthubala is there any exception??
The driver executable is a directory
Exception in thread "main" java.lang.IllegalStateException: The driver executable is a directory: /home/administrator/Desktop @ Saurabh Gaur
@muthubala did you download latest chrome driver from here chromedriver.storage.googleapis.com/index.html?path=2.22..
Yes 2.22 @ Saurabh Gaur
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.