-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCafe.js
More file actions
35 lines (18 loc) · 898 Bytes
/
TestCafe.js
File metadata and controls
35 lines (18 loc) · 898 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
35
import { Selector } from 'testcafe';
fixture `New Fixture`
.page `http://localhost:8080/`;
test('New Test', async t => {
await t
.switchToIframe('main [name="gsft_main"][title="Main Content"][data-original-title="Main Content"]')
.click('#user_name')
.typeText('#user_name', 'admin')
.pressKey('tab')
.typeText('#user_password', 'admin')
.click('#sysverb_login')
.switchToMainWindow()
.switchToIframe('main [name="gsft_main"][title="MyApp"][data-original-title="Main Content"]')
.click(Selector('span').withText('Welcome All'))
.click(Selector('#sysparm_button_result_page', { visibilityCheck: true }))
.click(Selector('#welcome_result\\.do div').withText('Welcome Links'))
.click(Selector('#sys_readonly\\.welcome_result\\.state').withText('Complete'));
});