I am having trouble clicking or interacting with some page elements. They seem like normal DOM objects. just buttons here is the code for one
<div style="clear: both; text-align: right">
<img id="nextstep" class="nextbtn" height="21" alt="" src="/edit/images/author/next.png">
</div>
After clicking a button as “Upload file” another pop up window was opened. My task is to upload a file at pop up window and back to original window. I’ll try to explain
I start a webDriver for
http://www.test.com (<- made up name for example)
I login
click upload a file button
After this click our site redirects to http://www.foo.com instead of the above I am using the same driver created earlier and I try to interact with the buttons on the post upload page
button.click()
It never finds these buttons but they are there in firebug and appear normal.
You may try to switch to the window again after the redirect.
Save you window handle:
redirect to the page you want and then call switchTo using the window handle:
Does your page contain any frames? It may also be possible that you are not in the correct frame after the redirect.