0

After getting geb to click a login button, I want to wait for the next page to load. The next page contains the following:

<th class="header">
   <div align="center">Welcome</div>
</th>

There isn't really any other content that allows me to test the page has loaded.

What should my waitFor expression look like?

$("input", value:"Login").click() // login action

// now wait for next page to load:
waitFor{ /* ?? */ }  // <-- how to locate the 'Welcome' text in /th/div/

Many thanks!

Chris Snow
  • 23,813
  • 35
  • 144
  • 309

1 Answers1

1

I suppose it should be waitFor{ $("div", text: "Welcome") }

olyv
  • 3,699
  • 5
  • 37
  • 67
  • Yes, I did actually have it working with this, but didn't realise it because the next line wasn't firing properly!! Many thanks. – Chris Snow Nov 04 '13 at 08:19