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

Return MobileElement directly from AppiumDriver.findElement?() and findElements?() methods #62

Merged
merged 3 commits into from
Jul 10, 2014

Conversation

prattpratt
Copy link
Contributor

I found out that we can make AppiumDriver to convert element Json representation directly to MobileElement rather than RemoteWebElement. So we don't need to wrap RemoteWebElement inside MobileElement but just use MobileElement as a rightful successor of RemoteWebElement.

Instead of:

MobileElement el1 = new MobileElement((RemoteWebElement)driver.findElementByAndroidUIAutomator("resourceId(\"android:id/content\")"), driver);

we can write down it in more simple way (as we used to) :

MobileElement el1 = (MobileElement) driver.findElementByAndroidUIAutomator("resourceId(\"android:id/content\")");

and also we can continue searching to find a child element under el1 (means use any methods available inside MobileElement class):

MobileElement el2 = (MobileElement) el1.findElementByAndroidUIAutomator("text(\"Accessibility\")");

@Jonahss
Copy link
Member

Jonahss commented Jul 10, 2014

Awesome! I didn't know about the setElementConverter function.
Thanks for updating that, AND the MobileCapabilities enums AND some tests.

I'm going to run all the tests, and add the methods described in #51 #55 #56 and publish a new version ^.^

@prattpratt
Copy link
Contributor Author

No problem!) Will be waiting for a new release.

Jonahss added a commit that referenced this pull request Jul 10, 2014
Return MobileElement directly from AppiumDriver.findElement?() and findElements?() methods
@Jonahss Jonahss merged commit e044b7c into appium:master Jul 10, 2014
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

Successfully merging this pull request may close these issues.

2 participants