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

Scripts

The document is a Java program that utilizes Selenium WebDriver to automate interactions with the Harissons Bags website. It demonstrates how to navigate through the main menu and various submenus related to different types of backpacks. The program includes implicit waits and uses the Actions class to perform mouse movements and clicks on the web elements.

Uploaded by

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

Scripts

The document is a Java program that utilizes Selenium WebDriver to automate interactions with the Harissons Bags website. It demonstrates how to navigate through the main menu and various submenus related to different types of backpacks. The program includes implicit waits and uses the Actions class to perform mouse movements and clicks on the web elements.

Uploaded by

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

package harissonsbags;

import [Link];

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

public class Action_harissonbag {

public static void main(String[] args) throws InterruptedException {


[Link]("[Link]",
"E:\\Selenium\\Driver\\[Link]");
WebDriver driver=new ChromeDriver();
//WebDriver driver=new FirefoxDriver();
[Link]().timeouts().implicitlyWait(10, [Link]);
[Link]().window().maximize();
[Link]("[Link]

[Link](5000);
Actions builder=new Actions(driver);
[Link](3000);
WebElement mainmenu=[Link]([Link]("//*[@class='level-
top']//*[text()='Backpacks']"));
[Link](mainmenu).build().perform();

WebElement submenu1=[Link]([Link]("//*[@class='level1 nav-2-1


first']//*[text()='Quadraquip Series']"));
[Link](submenu1).click().build().perform();

[Link](3000);
[Link](mainmenu).build().perform();
WebElement submenu2=[Link]([Link]("//*[@class='level1 nav-2-
2']//*[text()='School Backpacks']"));
[Link](submenu2).click().build().perform();

[Link](3000);
[Link](mainmenu).build().perform();
WebElement submenu3=[Link]([Link]("//*[@class='level1 nav-2-
3']//*[text()='Laptop Backpacks']"));
[Link](submenu3).click().build().perform();

[Link](3000);
[Link](mainmenu).build().perform();
WebElement submenu4=[Link]([Link]("//*[@class='level1 nav-2-
4']//*[text()='College Backpacks']"));
[Link](submenu4).click().build().perform();

[Link](3000);
[Link](mainmenu).build().perform();
WebElement submenu5=[Link]([Link]("//*[@class='level1 nav-2-
5']//*[text()='Day Packs']"));
[Link](submenu5).click().build().perform();

[Link](3000);
[Link](mainmenu).build().perform();
WebElement submenu6=[Link]([Link]("//*[@class='level1 nav-2-
6']//*[text()='Travel Backpacks']"));
[Link](submenu6).click().build().perform();

[Link](3000);
[Link](mainmenu).build().perform();
WebElement submenu7=[Link]([Link]("//*[@class='level1 nav-2-7
last']//*[text()='Casual Backpacks']"));
[Link](submenu7).click().build().perform();

You might also like