How to get xpath of custom check box in native ios app appium


I’m facing problem with an issue of getting attributes of custom check box in native ios app.
I had tried it by using appium inspector and ISO automation. In appium inspector its giving the xpath but thats not working related to the check box but in ISO automation I’m able to get only the co-ordinates of the check box "target.tap({x:48.50, y:372.00});

Please help me in resolving this issue.

Thanks in advance.

@sairaghava12345: You can use below xpath:


As @keshavjoshi49 suggest you can use that xpath if it doesn’t help you try to click element with co-ordinates…


Thanks for the help but its not working

The code
driver.findElement(By.xpath("//UIAStaticText[contains(@name,‘I accept’)]")).click();

The below the error
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)

Still any ideas please help me.

Thanks in advance

@sairaghava12345 : I think you should give a try to locator in appium, use that and it will help you to find the locator
You can try creating different custom xpaths and check which one works for you efficiently:
for e.g.: