Hello -

Question about selenium and its interaction with the DOM:

We are testing an app that uses _javascript_ to modify the DOM. We want to use selenium to interact with the modified version of the DOM, i.e. run assertions on the modified DOM, interact with _javascript_-generated DOM elements, etc. In our early investigations with selenium, it seems that the assert() functions always operate on the original version of the DOM. It seems that selenium does not see the JS-modified DOM. Is this the case?

We are running selenium 0.5 in Java-driven mode. What we want is to be able to do something like this:

  selenium.verifyElementNotPresent("foo");
 
  // this modifies the DOM, creating element "foo"
  selenium.click("createFoo");
 
  selenium.verifyElementPresent("foo");
 
I have verified that the same operations fail in a normal HTML-based test:

  <tr><td>verifyElementNotPresent</td><td>foo</td><td></td></tr>
 
  <tr><td>click</td><td>createFoo</td><td></td></tr>

  <tr><td>verifyElementPresent</td><td>foo</td><td></td></tr>

Whenever I run the above tests, although element "foo" is not found when expected, it *is* present when I "View DOM", leading me to believe there maybe be a simple fix here.

The ability to operate on a modified DOM is fundamental to our testing needs. Is there anything we can do? Anything we're doing wrong?

Thanks for your help!!

- Rick
 

_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to