0% found this document useful (0 votes)
2 views2 pages

STQAp2

The document provides Java code examples for launching web browsers using Selenium WebDriver. It includes separate code snippets for Chrome and Firefox, demonstrating how to set the driver properties and navigate to the GeeksforGeeks website. Each example initializes the respective WebDriver and opens the specified URL.

Uploaded by

yashparab0602
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

STQAp2

The document provides Java code examples for launching web browsers using Selenium WebDriver. It includes separate code snippets for Chrome and Firefox, demonstrating how to set the driver properties and navigate to the GeeksforGeeks website. Each example initializes the respective WebDriver and opens the specified URL.

Uploaded by

yashparab0602
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Practical 2

Using Chrome:

package Shubham_122Chrome;

import [Link];

import [Link];

public class LaunchBrowser_122 {

public static void main(String args[]) {

[Link]("[Link]","C:\\Users\\PRATIK TERSE\\Downloads\\
chromedriver-win64\\[Link]");

WebDriver wd = new ChromeDriver();

[Link]("[Link]

Output
Using Firefox:

package Shubham_122Firefox;

import [Link];

import [Link];

public class LaunchBrowser_122 {

public static void main(String args[]) {

[Link]("[Link]","C:\\Users\\PRATIK TERSE\\Downloads\\
geckodriver-v0.37.1-win64\\[Link]");

WebDriver wd = new FirefoxDriver();

[Link]("[Link]

Output:

You might also like