Thursday, March 23, 2023

Headless Browser Testing in Selenium: Best Tools and Frameworks to Use

 import java.io.IOException;

import org.openqa.selenium.NotFoundException;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.chrome.ChromeOptions;

public class Headless_Browser {

public static void main(String[] args) throws IOException, NotFoundException {

ChromeOptions options = new ChromeOptions();

options.addArguments("headless");

WebDriver driver = new ChromeDriver(options);

driver.get("https://suriyaparithy.blogspot.com/");

System.out.println("Title of the page is -> " + driver.getTitle());

}

}

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

No comments:

Post a Comment