Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gives an error for xpath" (//div[contains(@class,'no-result-contact-info')]/p)[1]" InvalidArgumentException: #411

Open
prakashAadhirai opened this issue Dec 4, 2023 · 4 comments

Comments

@prakashAadhirai
Copy link

(//div[contains(@Class,'no-result-contact-info')]/p)[1]
FAIL InvalidArgumentException: Message: invalid argument: invalid locator

This type of above Xpath [1] or ( used ) robotframework-appiumlibrary is not supporting is there any work around.
Libaray used
Appium-Python-Client 3.1.0
robotframework-appiumlibrary 2.0.0

@Dor-bl
Copy link
Contributor

Dor-bl commented Jan 2, 2024

Same issue for me when using Indexed XPATH.
i.e. (//XCUIElementTypeButton[@name="CowDetailCell_SaveButton"])[8]

robotframework-appiumlibrary 2.0.0
Appium-Python-Client==2.7.1

@mit4ever
Copy link

u can try xpath=(//XCUIElementTypeButton[@name="CowDetailCell_SaveButton"])[8]

@Dor-bl
Copy link
Contributor

Dor-bl commented Jan 12, 2024

You mean prefix the xpath=?

@michaljirka1-ext43891
Copy link

Hello,
Im dealing with the same problem in my project. This type of locator is working only with the xpath= prefix.
I would like to kindly ask you if you plan to solve this issue in any of te upcoming releases?

Thank you,
Michal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants