python - Detect location of specific text -
appium 1.5.0 xcode 7.3 ios 10.11.4 osx ei capitan using on:simulator ios 8.1
suppose have text field to see more information click
hereand more click
here.
so identified text using xpath
, can location , size. can somehow location of here .i need click it, because not element cannot search it. somehow if can location, can tap
@ that.
but how can location , still keep generic runs on different devices?
there isn't direct way achieve this(no api available in appium itself). however, solution generic , work on devices(android , ios), programming language implementation.
- [you have done] location , size of element.
- take screenshot of current screen.
- crop image screenshot using location , size of image.[this step can skipped if there not ambiguous targets]
- [you need 1 time manually] crop out image portion want location.
- search location of cropped image, location , perform precise tap/click.
for image search refer here : how find image within image using python
Comments
Post a Comment