TestProject Forum
Powered by leading experts in the test automation community

iOS native input field locating issue

Hello, I have just started using testProject for iOS native app automation with the build-in recorder option and I am stuck at the very start since it won’t click and type text into username input field. When i click the “find” option inside the element with the locator that is shown by default it always gives an error “Timeout occurred after 15000ms, trying to perform a click: Element was not found”. This error displays when I use click option, if I use tap then there is “No such element” error. I also tried increasing the timeout to 50000ms but it doesn’t work. Please help, thank you.

Hi Matipetar :slight_smile:
Sometimes elements have layers and it might happen that action goes to incorrect locator.
Did you also tried to use Element locator feature to find this exact element?

Hello Vladyslav, im not sure what you mean by using the element locator because there I can only create a locator from my own snippet. The thing is while im in inspect mode the element is located with the xpath i am using, only when I run the test it doesn’t receive the click command. Also while in inspect mode and when i hover the element it is highlighting the same xpath locator. The element is nested as you can see here //XCUIElementTypeWindow[1]/XCUIElementTypeOther[3]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeScrollView[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeTextField[1]​
If you have any other tips I would appreciate it, thanks.

I managed to solve the problem using a different xpath strategy to locate the input field.

Glad it resolved :slight_smile: Let me know please, if you will need help

1 Like