Appium ionic app raise an error when trying to use move_by_offset method
See original GitHub issueThe problem
I am automating an ionic application, the action which I am trying to perform is drag and drop of a range knob: ionic range knob The action which I am trying to perform does working correctly on the android app but it does not on the iOS app, for no real reason.
Environment
- Appium version (or git revision) that exhibits the issue: 1.21.0
- Last Appium version that did not exhibit the issue (if applicable): No
- Desktop OS/version used to run Appium: Mac OS 11.5.2
- Node.js version (unless using Appium.app|exe): v12.9.1
- Npm or Yarn package manager: 7.20.5
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Real Device
- Appium CLI or Appium.app|exe: cli
Details
When trying to perform on a slider WebElement the following action:
range_knob = node.find_element_by_class_name('range-knob')
action_chains = ActionChains(self.driver_)
action_chains.click_and_hold(range_knob).move_by_offset(xoffset, yoffset).release().perform()
An exception is being raised with the following message:
Message: The element identified by "5010" is either not present or it has expired from the internal cache. Try to find it again
Link to Appium logs
https://github.com/bwomsm1/AppiumLogs/blob/master/range_knob.log
Code To Reproduce Issue [ Good To Have ]
range_knob = node.find_element_by_class_name('range-knob')
action_chains = ActionChains(self.driver_)
action_chains.click_and_hold(range_knob).move_by_offset(xoffset, yoffset).release().perform()
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Actions - perform() method not working in iOS ionic app on ...
Hi All, I'm trying to enter data in text fields(username and password) using actions method in ionic app. The below code is used....
Read more >java - perform() method not working in iOS ionic app on textfields
I'm trying to enter data in text fields(username and password). I tried 2 approaches, 1. sendkeys(),. Issue: it didn't entered ...
Read more >How to Fix Common Errors with Appium Testing Framework
In this blog series, we will disclose to you the possible errors one might encounter using Appium. Let's begin. Error #1. Could not...
Read more >Conflict between ionic serve and appium · Issue #6956 - GitHub
The problem Selenium Webdriver fails at createSession if ionic serve is running. ... Node.js version (unless using Appium.app|exe): 4.4.5 ...
Read more >Simulating Mouse movement and dragging in a UWP ...
I am trying to write some highly customized UI testing code for windows UWP apps. I am using Appium and so far I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You could call ActionChains api with x/y coordinate (instead of an element) after switching the context with “NATIVE_APP”
If you want to perform native touch actions on web elements, you will also need to map the web coordinate space to the native coordinate space, as they are not the same. You can do this by getting the rect of the WebView element and using it to relative the web coordinates reported inside the webview.