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";;
Saurabh Gaur
  • 23,507
  • 10
  • 54
  • 73
muthubala
  • 9
  • 1
  • 7
  • [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Josh Aug 01 '16 at 09:21
  • Please share you code – Siva Aug 01 '16 at 09: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 = "https://mail.google.com"; – muthubala Aug 01 '16 at 09:46
  • 2
    [Selenium-Chrome setup](http://stackoverflow.com/questions/13724778/how-to-run-selenium-webdriver-test-cases-in-chrome) This might be helpful – Chandra Shekhar Aug 01 '16 at 15:37

1 Answers1

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..:)

Saurabh Gaur
  • 23,507
  • 10
  • 54
  • 73