-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
32 lines (28 loc) · 882 Bytes
/
test.js
File metadata and controls
32 lines (28 loc) · 882 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
auto.waitFor();
console.show();
function getCurrentPanel() {
const $rv_list_collection = selector().id('rv_list').untilFind();
const bottom = $rv_list_collection.get(0).bounds().bottom;
const $rv_list = $rv_list_collection.findOne(selector().boundsContains(0, 0, device.width, bottom));
return $rv_list;
}
/**
* @param {UiCollection} collection
*/
function findOneInCollectionById(collection, selectorId) {
const $uiobject = collection.findOne(selector().id(selectorId));
return $uiobject;
}
/**
* @param {UiCollection} collection
*/
function findInCollectionById(collection, selectorId) {
const $uicollection = collection.find(selector().id(selectorId));
return $uicollection;
}
setInterval(() => {
// home_tip_vf
// tv_title
const $uiobject = findInCollectionById(getCurrentPanel().children(), 'tv_title');
console.log($uiobject.text());
}, 1000);