-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapshot-iPad.js
47 lines (33 loc) · 1.51 KB
/
snapshot-iPad.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
#import "SnapshotHelper.js"
var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPERIGHT);
target.delay(10)
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].textFields()[0].tap();
target.frontMostApp().keyboard().typeString("grampe\nqwe123\n");
target.delay(10)
captureLocalizedScreenshot('0_my_serials')
target.frontMostApp().mainWindow().collectionViews()[0].cells().firstWithName("1").tap();
target.delay(10)
captureLocalizedScreenshot('1_serial_seasons')
target.frontMostApp().mainWindow().collectionViews()[0].tapWithOptions({tapOffset:{x:0.50, y:0.29}});
target.delay(10)
captureLocalizedScreenshot('2_serial_description')
target.frontMostApp().mainWindow().textViews()[0].buttons()["Schedule"].tap();
target.delay(10)
captureLocalizedScreenshot('3_serial_schedule')
target.frontMostApp().mainWindow().tableViews()[0].tapWithOptions({tapOffset:{x:0.28, y:0.29}});
target.frontMostApp().mainWindow().collectionViews()[0].cells()[0].tap();
target.delay(10)
captureLocalizedScreenshot('4_season')
target.frontMostApp().navigationBar().buttons()["back"].tap();
target.delay(2)
target.frontMostApp().navigationBar().buttons()["back"].tap();
target.delay(2)
target.frontMostApp().toolbar().buttons()["Все"].tap();
target.delay(10)
captureLocalizedScreenshot('5_all_serials')
target.frontMostApp().toolbar().buttons()["Расписание"].tap();
target.delay(10)
captureLocalizedScreenshot('5_schedule')