Wednesday, June 3, 2020

Store Chrome And Firefox Driver Log

Some time we need to write driver log to understand the issue in more deeply, for that reason we can write or store the driver log on any log file.

Step 1:

Create a driver service with log file path like below :

For Chrome

ChromeDriverService services = new ChromeDriverService.Builder().withSilent(false).withLogFile(new File("./src/test/resources/chrome.log")).build();

For Firefox

GeckoDriverService service = new GeckoDriverService.Builder().withLogFile(new File("./src/test/resources/firefox.log")).build();

Step 2:

Now pass the service parameter to WebDriver Instance.

WebDriver driver = new ChromeDriver(services);

12 comments:

  1. This is most informative and also this post most user friendly and super navigation to all posts.
    We are giving all Programming Courses such as You can

    Register for a free Demo Sessions

    RPA Ui Path Online Training
    Best Python Online Training
    Online AWS Training
    Online Data Science Training
    Hadoop Online Training

    ReplyDelete
  2. This is a great post I saw thanks to sharing. I really want to hope that you will continue to share great posts in the future.
    artificial intelligence course in noida

    ReplyDelete

  3. It is very ideal to see the best subtleties introduced in a simple and getting way. hrdf scheme

    ReplyDelete
  4. Thanks for the post. It was very interesting and meaningful. I really appreciate it! Keep updating stuff like this.

    Data Science

    Python

    Selenium

    ETL Testing

    AWS

    ReplyDelete
  5. Superb blog post! And this blog clearly explain about for useful information. I would Thanks for sharing this wonderful content. Its very useful to us. Keep it up!
    php interview questions and answers for freshers
    php programming interview questions
    php interview questions and answers pdf
    php and mysql interview questions

    ReplyDelete
  6. Great Content. It will useful for knowledge seekers. Keep sharing your knowledge through this kind of article.
    Effective Website Design
    Web Design Strategy

    ReplyDelete