I’ve been looking at this for a bit and can’t seem to find a good reference for Ruby on how to swipe to a particular element. I need some help with the format. Seen plenty of Java references but can’t seem to convert the code to Ruby.
- First would like to know what we should be using to navigate elements in a scroll. What is the current correct method with a snippet of example Ruby code. Everything I see explanations for is deprecated or just doesn’t work for me. The only swipe I’ve gotten to work is here ( and I read this was being deprecated as well):
direction1 is down
while (!find_element(name: element1).displayed?)
This will work to scroll but it is pretty frustrating that the default scroll goes past objects that aren’t currently visible. Basically I look for an item but since it isn’t visible and gets scrolled offscreen I can’t flag it using this method. My attempts at using the element option have failed. Is there a good reference somewhere that has ruby examples (the appium docs have not proved a good reference for me to implement Ruby). I’d just like to see an example of how to scroll to an element in a Native iOS code. I’m using a simulator or live device. Thanks for any help.
I’ve been trying to use TouchAction but can’t seem to get the ruby code to work. Keep getting errors. I’m sure it’s how I’m formatting it. I have x/y coordinates, and accessibility_id for the item I’m trying to navigate to. What would be example code to navigate to
Start_x = 15
Start_y = 251
End_x = 15
End_y = 340
Aceesibility_id = “Log Out”