-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWishListPage.java
More file actions
39 lines (29 loc) · 1.05 KB
/
WishListPage.java
File metadata and controls
39 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package hackthon;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class WishListPage {
WebDriver driver;
public WishListPage(WebDriver driver) {
this.driver=driver;
}
By Searchinput=By.id("small-searchterms");
By Searchbutton=By.xpath("//input[@class='button-1 search-box-button']");
By ClickBook=By.xpath("//img[@alt='Picture of Fiction EX']");
By addtowishlist=By.id("add-to-wishlist-button-78");
By BookClick=By.linkText("Books");
By ClickHealthbook=By.xpath("//img[@alt='Picture of Health Book']");
By addtowishlist1=By.id("add-to-wishlist-button-22");
public void searchbar(String text) {
driver.findElement(Searchinput).sendKeys(text);
driver.findElement(Searchbutton).click();
}
public void BookAdd() {
driver.findElement(ClickBook).click();
driver.findElement(addtowishlist).click();
}
public void Gotonavbarbook() {
driver.findElement(BookClick).click();
driver.findElement(ClickHealthbook).click();
driver.findElement(addtowishlist1).click();
}
}