Hi
I receive the error "System.NullReferenceException: Object reference not set to an instance of an object." on a coded step that logs a user out of web application in step 5, and then waits until the "thank you" text is displayed on the subsequent page until continuing with the script. The error is thrown on line 8. I construct the ThankYouSignOut object in line 7 almost exactly the same as the SignOutLink in step 2, so I'm at a loss as to why it's passing on step 2-5, but failing on 8. Any help would be appreciated!
1.
ActiveBrowser.Window.SetFocus
2.
Dim
SignOutLink AS HtmlAnchor = ActiveBrowser.Find.ByExpression(Of HtmlAnchor)(new HtmlFindExpression(
"tagname=a"
,
"href=~logout"
))
3.
SignOutLink.Wait.ForExists(30000)
4.
SignOutLink.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
5.
SignOutLink.MouseClick
6.
ActiveBrowser.Window.SetFocus
7.
Dim
ThankYouSignOut AS HtmlControl = ActiveBrowser.Find.ByExpression(Of HtmlControl)(new HtmlFindExpression(
"tagname=p"
,
"TextContent=^Thank you for using"
))
8.
ThankYouSignOut.Wait.ForExists(30000)