Conversation
|
Looks like Android is having trouble finding the element. I think because it needs to scroll. Looking into this now. |
…k buttons on Android
|
@geriux This is good to go now |
| if ( ! await this.driver.hasElementByAccessibilityId( blockName ) ) { | ||
| for ( let step = 0; step < 5; step++ ) { | ||
| await this.driver.pressKeycode( 20 ); // Press the Down arrow to force a scroll. | ||
| } | ||
| } |
There was a problem hiding this comment.
Just wondering if you tried to use the swipeDown helpers, like let's say we add an ID to the Bottom Sheet and then swipe down to find the element. What do you think?
There was a problem hiding this comment.
I tried using the TouchActions TouchAction().press(...).moveTo(...).release() for some reason I couldn't get it to recognize the touch within the modal. I even tried using it to Click on an already visible view with no luck.
I then took a look at the mobile commands, but swipeDown and scroll aren't supported for Android, so I didn't bother trying those.
I could have been missing something for the touch events, but I would probably need some pair programing there to help figure it out.
There was a problem hiding this comment.
More specifically this was the example I was working from:
let action = new wd.TouchAction();
action.press({x: 10, y: 10});
action.moveTo({x: 10, y: 100});
action.release();
await action.perform();
http://appium.io/docs/en/commands/interactions/touch/touch-perform/
For the coordinates, I replaced the x with the middle of the screen and set the y to be a few pixels from the bottom of the scroll to a few pixels from the top
There was a problem hiding this comment.
Thanks for the detailed explanation! Since I'm also new to appium I wanted to investigate a bit but as you mentioned in your findings we are very limited on Android, tried some things with no luck. This makes me realize we should definitely try out Detox. It's kinda crazy we can't swipe 🤯
There was a problem hiding this comment.
Thanks for taking the time to explore your other ideas! I was actually hoping one of your ideas worked 😅 this is a bit of a hacky approach haha
|
@chipsnyder I'm moving this to 1.26, feel free to move it back to 1.25 if this is something that can be considered a regression. |
Adds a device test for latest posts and adds the block to the initial html in order to help catch regressions
To test:
The CI run of the device tests should be enough to validate
PR submission checklist:
RELEASE-NOTES.txtif necessary.