How to click an element which has no unique identifier?

I need to click on terms and conditions link .but I have a single identifier for “By signing in you are agreeing to terms and conditions”.In this only terms and conditions is clickable .since the entire text has a single identifier, click is going to “by signing…” Which is not clickable.So code gives no error and click is not happening.i am using appium, Android, selenium-java.

Hi @deepakkg88, try clicking on later part of the text by taking percentage position… i.e, if your element has 100% length, find a relative position (within the element) of terms and conditions link and try clicking on that. See the similar question here

Good time to explore OCR , try Tess4J , would be a good learning

Thank you @mashkurm. it worked.

1 Like