Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

robot framework + appium is unable to access element by ID in ionic angular application

I am using Robot framework + Appium library for automation testing of ionic app . developer team assigns id to components . but when i am giving click element id command then there is error . unable to find that element . is there any different way to access ionic component in appium ?

like image 504
vivek kumar sharma Avatar asked Mar 20 '26 15:03

vivek kumar sharma


1 Answers

What I think is you need exact way of using resource-id in appium. I have used resource-id with with xpath and it is working great.

you need to find exact resource-id from elements in appium and then make xpath with that ID.

For example: let say your div has ID "stackOverFlowDivId". then your xpath will be : xpath=//*[@resource-id='stackOverFlowDivId']

Use this method and try finding xpath in appium.

Hope you get success. Best luck.

like image 98
Amit Gandole Avatar answered Mar 23 '26 03:03

Amit Gandole



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!