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

7
  • @muthubala is there any exception??CommentedAug 1, 2016 at 10:37
  • The driver executable is a directory
    – muthubala
    CommentedAug 1, 2016 at 10:39
  • Exception in thread "main" java.lang.IllegalStateException: The driver executable is a directory: /home/administrator/Desktop @ Saurabh Gaur
    – muthubala
    CommentedAug 1, 2016 at 10:44
  • @muthubala did you download latest chrome driver from here chromedriver.storage.googleapis.com/index.html?path=2.22..CommentedAug 1, 2016 at 10:49
  • Yes 2.22 @ Saurabh Gaur
    – muthubala
    CommentedAug 1, 2016 at 10:50

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.