Uh oh!
There was an error while loading. Please reload this page.
find element by nspredicate string. - #352
Conversation
rafe-g
commented
Mar 31, 2016
@jlipps@Jonahss |
rafe-g
commented
Mar 31, 2016
FYI @ericwengelking |
TikhomirovSergey
commented
Mar 31, 2016
@Rafael-Chavez
|
| } | ||
| public static By IosNsPredicateString(final String id) { |
There was a problem hiding this comment.
sorry let me fix this, should be iOSPredicateString
rafe-g
commented
Mar 31, 2016
@TikhomirovSergey added test and updated pr description. |
| public static By IosNsPredicateString(final String iOSNsPredicateString) { | ||
| if (iOSNsPredicateString == null) { | ||
| throw new IllegalArgumentException("Must supply an iOS NsPredicate String"); |
There was a problem hiding this comment.
Since this is just a comment I would format it "NSPredicate" instead of "NsPredicate"
ericwengelking
commented
Mar 31, 2016
lgtm thanks @Rafael-Chavez ! |
| @SuppressWarnings("unchecked") @Override | ||
| public RequiredElementType findElementByIosNsPredicate(String using) | ||
| throws WebDriverException { | ||
| return (RequiredElementType) findElement("predicate string", using); |
There was a problem hiding this comment.
I'd prefer for the locator strategy to be called "-ios ns predicate" or "-ios predicate string". either way it must have a - in front of it (see "-ios uiautomation" for analogy above)
TikhomirovSergey
commented
Apr 3, 2016
@Rafael-Chavez I'm going to check it and merge it if everything is ok. |
rafe-g
commented
Apr 26, 2016
@TikhomirovSergey can we ship this? |
TikhomirovSergey
commented
Apr 27, 2016
@Rafael-Chavez Ok. I think that we are not able to merge this PR because:
|
rafe-g
commented
Apr 27, 2016
Appium works with appium-xcuitest-driver (I have it running locally), however it does not come with it out of the box. Which one were you referring to @TikhomirovSergey ? Yes ill isolate the xcui driver test that i added to a XCUIDriverTest.java class. |
TikhomirovSergey
commented
Apr 27, 2016
@Rafael-Chavez |
bootstraponline
commented
Apr 27, 2016
Hi, I'm in favor of this change being merged. The documentation should clearly state it's limited to the XCUITest driver because the old UIAutomation JavaScript driver also supports predicates. Once the test is moved to |
rafe-g
commented
Apr 27, 2016
@TikhomirovSergey isolated the test. |
TikhomirovSergey
commented
Apr 28, 2016
@Rafael-Chavez ...And then I'll merge it |
rafe-g
commented
Apr 28, 2016
Moved the test to a separate file. @TikhomirovSergey Is this for me to create a Readme file with instructions on how to install appium-xcuitest-driver? |
SrinivasanTarget
commented
Apr 29, 2016
@Rafael-Chavez Yes, you can create one here, https://github.com/appium/java-client/tree/master/docs |
@Rafael-Chavez |
TikhomirovSergey
commented
Apr 29, 2016
@Rafael-Chavez |
| import org.openqa.selenium.ScreenOrientation; | ||
| import org.openqa.selenium.html5.Location; | ||
| public class XCUIDriverTest extends BaseIOSTest { |
There was a problem hiding this comment.
Please add remove extends BaseIOSTest and add @BeforeClass/@BeforeTest and @afterclass/@after methods. They should instantiate IOSDriver with specific capabilities, I think. May be it needs some specific server flags.
This test won't work. It is using regular iOS UI Automation.
There was a problem hiding this comment.
This test won't work. It is using regular iOS UI Automation.
I've read this document
https://github.com/appium/appium-xcuitest-driver#usage
But anyway BaseIOSTest uses another app. This test won't find the target element.
rafe-g
commented
Apr 29, 2016
@TikhomirovSergey got it working with xcuitest driver. Ill push documentation then squash my commits. |
rafe-g
commented
Apr 30, 2016
@TikhomirovSergey@SrinivasanTarget according to github admin users need to squash? https://help.github.com/articles/about-pull-request-merge-squashing/ |
bootstraponline
commented
Apr 30, 2016
admins can squash for you, but it's better to do it yourself. |
rafe-g
commented
Apr 30, 2016
Thanks @bootstraponline !!!! |
TikhomirovSergey
commented
May 1, 2016
@Rafael-Chavez |
TikhomirovSergey
commented
May 1, 2016
Also #379 has been opened. |

Change list
Please provide briefly described change list which are you going to propose.
Added NSPredicate string to the java-client to support xcuitest driver nspredicate element search.
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that applyDetails
Please provide more details about changes if it is necessary. If there are new features you can provide code samples which show the way they
work and possible use cases. Also you can create gists with pasted java code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub