-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWrappers.java
More file actions
105 lines (82 loc) · 2.01 KB
/
Wrappers.java
File metadata and controls
105 lines (82 loc) · 2.01 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package base;
import org.openqa.selenium.WebElement;
import java.util.List;
public interface Wrappers {
/**
* click WebElement
*
* @param element
*/
public void clickButton(WebElement element);
/**
* Scroll to a WebElement and click another WebElement
*
* @param scrollToElement
* @param clickElement
*/
public void clickButton(WebElement scrollToElement, WebElement clickElement);
/***
* Click Element - Without scroll to the element
*
* @param element Webelement
* @throws Exception
*/
void clickButtonWithOutScroll(WebElement element);
/***
* enter text
*
* @param element
*/
void enterText(WebElement element, String... textValue);
/***
* get text of element
*
* @param element - WebElement
* @return - String - !!!element.getText()
*/
String getText(WebElement element);
/***
* Mouse over to the element Web
*
* @param element
*/
void mouseOver(WebElement element);
/***
* Quit all openned Tabs
*/
void quitBrowser();
/***
* Close the current window
*/
void closeBrowser();
/***
* Switch to Parent Window ---using windowsHandles
*/
void switchToParentWindow();
/***
* Switch to Last Window ---- using windowsHandles
*/
void switchToLastWindow();
/***
* Method isElementDisplayed is used to verify element isDiplayed
*
* @param elements- List of Elements
* @return - true or false
*/
boolean isElementDisplayed(List<WebElement> elements);
/*
* gets the title of the current page
*/
String getPageTitle();
/****
* Dropdown Select Methods
*/
interface SelectDropDown {
void selectByIndex(WebElement element, int index);
void SelectByValue(WebElement element, String value);
void SelectByVisibleText(WebElement element, String text);
void clickButtonWithOutScroll(WebElement element);
void clickButton(WebElement scrollToElement, WebElement clickElement);
void clickButton(WebElement element);
}
}