Closed latin-panda closed 1 month ago
This is almost ready (Draft PR) the only thing blocking me is that I can't make the view to scroll automatically to click on elements that at the bottom of the view. I have reached for help to @ralfudx and @Benmuiruri. @Benmuiruri is able to reproduce the same problem I experienced.
I have tried all these things to scroll after the view is fully rendered, but not working:
await $(assert.selector).scrollIntoView();
// eslint-disable-next-line max-len
await $('android=new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textMatches("New Wilbertton Concession").instance(0))');
// eslint-disable-next-line max-len
await $('android=new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textMatches("Concessions").instance(0))');
// eslint-disable-next-line max-len
await $('android=new UiScrollable(new UiSelector().scrollable(true).description("Concessions")).scrollIntoView(new UiSelector().textMatches("New Wilbertton Concession").instance(0))');
// eslint-disable-next-line max-len
await $('android=new UiScrollable(new UiSelector().scrollable(true).instance(0)).setSwipeDeadZonePercentage(50).scrollIntoView(new UiSelector().textMatches("New Wilbertton Concession").instance(0))');
// eslint-disable-next-line max-len
await $('android=new UiScrollable(new UiSelector().scrollable(true).instance(0)).setSwipeDeadZonePercentage(50).scrollIntoView(new UiSelector().textMatches("Concessions").instance(0))');
// eslint-disable-next-line max-len
await $('android=new UiScrollable(new UiSelector().scrollable(true)).scrollForward()');
await $('android=new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollToEnd(1)');
await $('android=new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollForward()');
If we help the test to scroll manually, the navigation works. But we must make it scroll automatically.
Completed!, the work was merged into Rafa's branch. He can continue with the navigation stuff and other feedback from Diana, etc... while I'm working on the script for forms
Make a script to navigate regardless of the hierarchy and wait for elements to appear.
Continuation of this:
I made a gist with a draft of what this settings file might look like. It will probably get simplified a bit more later. You can see a JSON file containing the settings. The idea is to have one file per config (kenya, uganda, etc), which contains the selectors and values to make the e2e work.