Skip to content

🐞 bug: <title> Matched W3C error code 'no such element' to NoSuchElementError #1157

@KaiJia2017

Description

@KaiJia2017

Is there an existing issue for this?

  • I have searched the existing issues

Appium Version

appium:2.19.0 xcuitest:9.4.0 appium-Python-Client:5.1.1 ideviceinfo 1.3.0-282-g796d09d ideviceinstaller 1.1.1

Appium Host Type

Command Line

Are you using Appium components not maintained by the Appium team?

No response

Is this issue reproducible using the latest components?

  • I confirm the issue is still reproducible with the latest component versions

Current Behavior

An error occurs when executing the Back method.

Expected Behavior

My code is protected by try except. Even if EC.visibility_of_element_located(("accessibility id", "Back") cannot find the element, is it possible to not have an exception? How can I modify the code?

Appium Log

appium_00008140-000134602402201C.log

Environment Details

  • Debug details (appium --show-debug-info):
  • Last component version(s) which did not exhibit the problem:
  • Platform and version of device under test:
  • Real device or emulator/simulator:

Minimal Reproducible Example

def back(self):
try:
self.reset_consecutive_swipe_time()
WebDriverWait(self.driver, 3).until(
EC.visibility_of_element_located(("accessibility id", "Back"))
).click()
except:
self.driver.execute_script("mobile: swipe", {"direction": "right"})

Further Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions