views:

39

answers:

2

I'm very confused on how to access the newly loaded page's DOM after I .click() the submit button on a page and am sent to another one.

Any ideas?

Thanks.

+1  A: 

The click() method should return an HtmlPage object with the new page:

HtmlPage newPage = myElement.click();
mamoo
Haven't tested it, but it makes sense to me. Thank you.
Allen Gingrich
A: 

Since you're being redirected to a new page, wouldn't you handle that page's DOM just like you normally would? In jQuery you would use:

$(document).ready()

And when the DOM has finished loading, you can manipulate it however you want.

sigint