-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec.ts
More file actions
34 lines (24 loc) · 912 Bytes
/
spec.ts
File metadata and controls
34 lines (24 loc) · 912 Bytes
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
import { browser, element } from "protractor";
import {by } from "protractor";
import { async } from "q";
import {calculator} from "./pageObjects/calculator";
import {AngularHomePage} from "./pageObjects/AngularHomePage";
describe('test suite',()=>{
it('test case', async()=>{
let calc = new calculator();
await browser.get('http://juliemr.github.io/protractor-demo/');
await calc.firstEditBox.sendKeys(1);
await calc.secondEditBox.sendKeys(2);
await calc.goBtn.click();
calc.findItem.getText().then(function(text)
{
console.log(text);
})
})
it('Angular home page title validation', async()=>{
let angularPage = new AngularHomePage();
await browser.get('https://angularjs.org/');
await angularPage.AngularLink.click();
await angularPage.SearchBox.sendKeys("examples");
})
})