robotframework-appiumlibrary icon indicating copy to clipboard operation
robotframework-appiumlibrary copied to clipboard

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

Open prakashAadhirai opened this issue 2 years ago • 6 comments

(//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

prakashAadhirai avatar Dec 04 '23 08:12 prakashAadhirai

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

Dor-bl avatar Jan 02 '24 13:01 Dor-bl

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

mit4ever avatar Jan 12 '24 02:01 mit4ever

You mean prefix the xpath=?

Dor-bl avatar Jan 12 '24 05:01 Dor-bl

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

michaljirka1-ext43891 avatar Oct 21 '24 14:10 michaljirka1-ext43891

As we are reviewing tickets I want to ask if you all are still having issue with this?

emanlove avatar Sep 01 '25 15:09 emanlove

Hi, yes, we need to add the xpath= prefix for elements with multiple occurrences.

luprochazka-cen63872 avatar Sep 02 '25 07:09 luprochazka-cen63872