Rookie question. I am using webdriver.io to write Appium end to end tests.
I am using these commands to check the presence of an element:
$(selector)
browser.waitForVisible(selector, timeout, waitForAppearOrDisappear);
browser.element('selector')
They all block my tests if the element is not found.
How can I check whether an element exists in a particular moment without blocking the test execution?
I cannot find anything in the (concise) documentation.
PS. This should do the trick browser.findElement(By.css('[data-qa="some-id"]'));
but it's not a wdio command. (findElement
and By
are not recognized)
npm dependencies:
"appium": "^1.10.0",
"appium-doctor": "^1.6.0",
"wdio-appium-service": "^0.2.3",
"wdio-jasmine-framework": "^0.3.8",
"wdio-spec-reporter": "^0.1.5",
"webdriverio": "^4.14.1",