-
Notifications
You must be signed in to change notification settings - Fork 0
/
zoosk.js
36 lines (29 loc) · 1.29 KB
/
zoosk.js
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
describe('Zoosk', function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 43200000; //In miliseconds
var userID = "[email protected]";
var password = "Ab@2dragons";
var message = "Hey trouble :)";
var login_button = element(by.xpath(".//*[@id='login-form-trigger']"));
var email_textBox = element(by.xpath("html/body/div[4]/div/div/div/div/div[3]/form/div/div[1]/input"));
var password_textBox = element(by.xpath("html/body/div[4]/div/div/div/div/div[3]/form/div/div[2]/input"));
var submitCredentials = element(by.xpath("html/body/div[4]/div/div/div/div/div[3]/form/button"));
browser.waitForAngularEnabled(false);
function signInUser() {
return login_button.click().then(function() {
browser.wait(protractor.ExpectedConditions.visibilityOf(email_textBox), 10000,"Element not visible timing out");
return email_textBox.sendKeys(userID).then(function() {
return password_textBox.sendKeys(password).then(function() {
return submitCredentials.click();
});
});
});
};
it('should automatically send messages', function() {
browser.get('http://www.zoosk.com/').then(function() {
//Sign in User
signInUser().then(function() {
browser.pause();
});
});
});
});