-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestTeclas.js
79 lines (44 loc) · 2.75 KB
/
testTeclas.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
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
function testTeclas(globalVar, eventEmitter){
(async () => {
const puppeteer = require('puppeteer');
const keyboardMapping = require('./USKeyboardLayout.js');
const browser = await puppeteer.launch(PUPPETEER_OPTS)
const page = await browser.newPage()
await page.goto("https://www.bwin.es/es/mobileportal/register?trid=in12391")
await page.setViewport({ width: 558, height: 969 })
await page.waitForSelector(".form-group > pt-reg-email > .ng-invalid > #emailaddress > .form-control-i-l");
await page.click(".form-group > pt-reg-email > .ng-invalid > #emailaddress > .form-control-i-l");
await page.keyboard.down(keyboardMapping.keyCodeLayout[71].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[71].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[66].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[66].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[73].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[73].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[16].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[71].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[16].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[71].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[66].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[66].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[73].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[73].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[16].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[67].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[67].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[83].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[83].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[65].code)
await page.keyboard.down(keyboardMapping.keyCodeLayout[83].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[83].code)
await page.keyboard.up(keyboardMapping.keyCodeLayout[16].code)
})()}
module.exports ={
testTeclas: testTeclas
}