Reputation: 1211
I'm want to use timeout while waiting page contains element but exeuction complaint error
java.lang.IllegalArgumentException: Unable to compile '//android.widget.ImageButton[@content-desc="Close navigation drawer"] timeout=20s
test case:
*** Settings ***
Library AppiumLibrary
*** Variables ***
${compose-new-mail} id=android.widget.ImageButton
${navigation-drawer} //android.widget.ImageButton[@content-desc="Close navigation drawer"]
${navigation-drawer2} //android.widget.ImageButton[contains(@content-desc, "Close navigation drawer")]
*** Test Cases ***
Open Application
Open Application http://localhost:4723/wd/hub platformName=Android deviceName=2529b29c9b0c7ece appPackage=com.test.aa.work.cac appActivity=com.test.aa.activity.MailActivityEmail automationName=Uiautomator2 noReset=true userProfile=10 optionalIntentArguments=--user 10 -n "com.test.aa.work.cac/com.test.aa.activity.MailActivityEmail"
Wait Until Page Contains Element ${navigation-drawer} timeout=20s
appiumlibrary.tap ${compose-new-mail}
Upvotes: 0
Views: 109
Reputation: 6935
If you copied/pasted your code exactly, then there is a missing space before timeout
.
Wait Until Page Contains Element ${navigation-drawer} timeout=20s
should be
Wait Until Page Contains Element ${navigation-drawer} timeout=20s
Upvotes: 2