Is there a way to verify my test bounced to the correct link in safari?

I am currently running appium with C# to test a iOS native app. My test case is as following

  1. User clicks Terms of Service in native app
  2. Verify user gets bounced to terms of service in safari

Is there a way to switch drivers to verify that we are hitting the correct url? Or a way to check that the hyperlink is correct without the bounce?

just check that some text appeared. easier in times.

What do you mean by that?

  1. you tap on web link
  2. safari view will open
  3. you can check that some text (some phrase) loaded on screen without switching driver. you can get it without switching.

Gotcha, I’ll do that. Thank you!

Are you saying to do something like or is there another method to get the text off the screen?

var text = _driver.FindElement(By.XPath("//*[contains(text(), ‘SOME TEXT’)]"));

nooooo. xPath is very slow. use predicates -> https://appium.io/docs/en/writing-running-appium/ios/ios-predicate/

1 Like