Skip to content

Method shouldNotBe(exist) throws NoSuchElementException for a non-existent SelenideApiumElement #2665

@232629

Description

@232629

The problem

Calling a method $.shouldNot(exist) on a non-existent SelenideAppiumElement throws an error.

Details

Tell us about your environment

  • Selenide-Appium Version: 7.2.0
  • OS Version: Win 10
  • Appium Version: 2.5.1
  • uiautomator2 Version: 2.45.1

Code To Reproduce Issue

public void test() {
    SelenideAppium.$(Selenide.$(By.xpath("Nope"))).shouldNotBe(exist);
}
Element not found {By.xpath: Nope}
Expected: exist
Screenshot: file:/D:/test/Mobile/app5/app5AndroidUI/target/screenshots/1709209344135.0.png
Page source: file:/D:/test/Mobile/app5/app5AndroidUI/target/screenshots/1709209344135.0.xml
Timeout: 30 s.
Caused by: NoSuchElementException: An element could not be located on the page using the given search parameters.

FullStackTrace.txt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions