-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.js file
35 lines (27 loc) · 861 Bytes
/
.js file
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
this.LoginPage = function (driver) {
GalenPages.extendPage(this, driver, {
//email: "id: edit-name--2", // css locator
//password: "id: edit-pass--2", // xpath locator
//submitButton: "id: edit-submit--2", // id locator
menuTest: "id: menu-1314-1",
menuOpen:"id:testid"
load: function () {
this.open("mysite");
return this.waitForIt();
},
//loginAs: function (userName, password) {
// this.email.typeText(userName);
// this.password.typeText(password);
// this.submitButton.click();
//},
hoverAs: function () {
//this.menuTest.click();
this.menuTest.hover(menuOpen);
}
});
};
// now you can use it like this
var loginPage = new LoginPage(driver).load();
// loginPage.hoverAs();
loginPage.hoverAs();
// loginPage.loginAs("[email protected]", "password");