iOS WebUI verifyElementExists

Have the following test case on a hardware iOS device and doesn’t work. The verifyElementExist is the problem. The openBrowser opens a Safari browser.

WebUI.openBrowser(‘https://ads.google.com’)
Mobile.verifyElementExist(findTestObject(‘iOS/XCUIElementTypeLink - Google’), 0)

Also tried -

WebUI.openBrowser(‘https://ads.google.com’)
WebUI.verifyElementExist(findTestObject(‘iOS/XCUIElementTypeLink - Google’), 0)

The object ‘iOS/XCUIElementTypeLink - Google’ is a valid object found in the Spy Mobile.

The selector locator is “//*[@type = ‘XCUIElementTypeLink’ and @label = ‘Google’ and @name = ‘Google’]” which is valid on a mobile capture.

Maybe you are going too fast. Can you try a wait statement after the open browser and before the verifyElementExist?