robotframework-appiumlibrary
robotframework-appiumlibrary copied to clipboard
iOS -- Get Element Attribute -- Attribute 'enabled' is not valid for element 'XXX'
Hello ! I have an issue getting the attribute 'enabled' of a XCUIElement (iOS environment)
Here is a part of the XML:
<XCUIElementTypeToolbar type="XCUIElementTypeToolbar" enabled="true" x="0" y="623" width="375" height="44">
<XCUIElementTypeImage type="XCUIElementTypeImage" enabled="true" x="0" y="622" width="375" height="1"/>
<XCUIElementTypeImage type="XCUIElementTypeImage" enabled="true" x="0" y="623" width="375" height="44"/>
<XCUIElementTypeButton type="XCUIElementTypeButton" name="Share icon" label="Share icon" enabled="false" x="47" y="624" width="55" height="41"/>
<XCUIElementTypeButton type="XCUIElementTypeButton" name="Info icon" label="Info icon" enabled="false" x="127" y="624" width="54" height="41"/>
<XCUIElementTypeButton type="XCUIElementTypeButton" name="Rename icon" label="Rename icon" enabled="false" x="205" y="624" width="47" height="41"/>
<XCUIElementTypeButton type="XCUIElementTypeButton" name="Trash icon" label="Trash icon" enabled="false" x="277" y="624" width="51" height="41"/>
</XCUIElementTypeToolbar>
When I run this code:
AppiumLibrary.Get Element Attribute | accessibility_id=Trash icon | enabled
I get this error: Attribute 'enabled' is not valid for element 'accessibility_id=Trash icon'
Do you know the cause of it ?
I tried also the Element Should Be Enabled keyword, without success.
Edit: I use robotframework-appiumlibrary 1.4.2 and appium 1.4.6beta Edit: appium 1.6.4-beta ...
Thank you !
Célian Garcia
Hello, @celian-garcia, first of all you seem to use XCUIElement in Appium 1.4.6beta. iOS 10 support came only with Appium 1.6.x. I suggest you upgrade to latest stable version.
Did you try:
AppiumLibrary.Get Element Attribute | id=Trash icon | enabled
Still thought I dont belive you can use this version of Appium
Oh sorry i mixed up the version numbers ^^' I'm using 1.6.4beta obviously.
I just tried with id=Trash Icon and same error occurred:
Attribute 'enabled' is not valid for element 'id=Trash icon'
I also tried with a valid xpath and it says the same error.
Closing due to inactivity