-
-
Notifications
You must be signed in to change notification settings - Fork 768
Description
Description
While automating for iOS Safari, I tried to use Predicate String strategy to identify the elements on a web page. I first tried to find the element with Appium UI and it worked fine and I was able to get element highlighted. The same I used in my code but it threw Unsupported strategy exception from the code. On debugging more using the Appium console in both the cases, I found that the "using" parameter sent in case of the Appium inspector and the value sent from the java_client are different. The inspector sends the value as "predicate string" that works fine. Whereas from the java_client code the MobileSelector has the value of IOS_PREDICATE_STRING as "-ios predicate string" that doesn't work.
Environment
-
java client build version or git revision if you use some shapshot: 5.0.0
-
Appium server version or git revision if you use some shapshot: 1.7.1
-
Desktop OS/version used to run Appium if necessary: Mac OS high Sierra (10.13.2)
-
Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 1.2.7
-
Mobile platform/version under test: iOS 11.0
-
Real device or emulator/simulator: Real Device
Details
PLEASE LOOK AT THE ATTACHED FILE FOR CODE AND LOGS
MobileSelectorValueIssue.docx
Code To Reproduce Issue [ Good To Have ]
Please remember that, with sample code; it's easier to reproduce bug and much faster to fix it.
You can git clone https://github.com/appium/sample-code or https://github.com/appium/sample-code/tree/master/sample-code/apps and reproduce an issue using Java and sample apps.
Also you can create a gist with pasted java code sample or put it here using markdown. About markdown please read Mastering markdown and
Writing on GitHub
Ecxeption stacktraces
Please create a gist with pasted stacktrace of exception thrown by java.
Link to Appium logs
Please create a gist which is a paste of your full Appium logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, always include Appium logs as linked gists! It helps to define the problem correctly and clearly.