joy
joy

Reputation: 111

how to use puppeteer in selenium automation testing for head less chrome

If any one knows, what is puppeteer and how to use this in selenium automation for headless chrome please guide me.

Below is the link for puppeteer.

https://github.com/GoogleChrome/puppeteer

1) can i use this with java language for automation testing?

2) what is the use of using this?

I am new to this puppeteer and I wanted to use this in my project which is built on java and selenium.

Upvotes: 4

Views: 8850

Answers (2)

Amir Imam
Amir Imam

Reputation: 1

For Selenium Headless execution you can use following code or watch video https://www.youtube.com/watch?v=iNZSLYkTBSE

Initialize driver with option

var chromeOptions = new ChromeOptions();
chromeOptions.AddArguments("Headless");
IWebDriver driver = new ChromeDriver(chromeOptions);

Upvotes: 0

Everettss
Everettss

Reputation: 16039

Puppeteer is replacement for selenium running only on Chrome. It's not possible to run puppeteer from selenium. Puppeteer is designed only for chrome and run only in Node.js environment. If you are interested in running chrome headless from selenium this thread can be valuable for you.

Upvotes: 8

Related Questions