Search code examples
seleniumappium

Unable to click button in mobile web in appium


After exhaustively searching for this over various forums, I still don't have an answer. Here are complete details

I'm identifying the element through classname which points to multiple(4) buttons. I'm iterating through buttons and then search for text and when there is a match i click it.

This works fine with selenium webdriver and browsers such as firefox,chrome

Now I'm doing the same thing with appium. Out of 4 buttons which are identified through classname, the script clicks 2 buttons successfully but for two buttons click happens(i can see the button being clicked) but new page which should be loaded is not loaded. The buttons for which click is not happening are in a footer class and other two are in div class.

Things i have already tried

  1. Actions builder - click(), clickandhold()
  2. Javascript executor

I'm currently trying with touch options, tap and by switching to native view but haven't found any success.

If any has encountered the same, a solution will be appreciated.

I want to avoid xPath because that might change in the page I'm working on, and I want to stress that the script is able to find the button, but is not able to click it properly.


Solution

  • Upadting appium java client to 1.5.0 (from 1.3.0) solved the issue. Need to check why!