wdio-jasmine

Webdriver.IO - check in a non-blocking way whether an element exists

早过忘川 提交于 2019-12-19 11:45:09
问题 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