DOM « selenium « Java Testing Q&A

Home
Java Testing Q&A
1.Development
2.FindBugs
3.HTMLUnit
4.hudson
5.junit
6.performance
7.plugin
8.profile
9.selenium
10.Tools
11.unit test
Java Testing Q&A » selenium » DOM 

1. Can I access a DOM object with Selenium?    stackoverflow.com

I am coming from a QuickTest Pro background where I can get to any element's DOM object with the .object method. I want to know what the equivalent is in ...

2. Is there a way to get/save the DOM with Selenium?    stackoverflow.com

What I'm looking for is a method that works like "captureScreenshot(String path)", but instead of producing an image is saves the DOM as it currently is. Note that the existing getBodyText() method ...

3. Selenium fails to find component after dom update (reRender)    stackoverflow.com

I'm testing a richfaces application with selenium. It works fine, unless I use reRender. (for those unfamiliar with richfaces - whenever an ajax request finished, parts of the DOM are updated/chagned/removed). So, ...

4. javascript / selenium: get the window from the document object    stackoverflow.com

I am writing user extensions to selenium. I have the document object. How can I get the window object of the window that contains my document?

PageBot.prototype.locateElementByMyLocator= function(text, inDocument) {
   ...

5. How to use the DOM locators in Selenium    stackoverflow.com

I've the HTML source like this,

<input type="image" onclick="return logSub();" src="/images/Login_submit.gif" width="105" height="33" border="0" />
Here there is no ID or NAME. So I can only locate this using image index (which is ...

6. Selenium Dom values are not updated    stackoverflow.com

I am seeing a problem in Selenium with IE6/8 that is giving me some bad time. The problem is that the DOM window properties are not updated after actions are done ...

7. Can I test for the end of the content of a text/plain file with Selenium or javascript?    stackoverflow.com

I have a page that results in a text/plain file being displayed in the browser that looks like this:

...
Admin   Site    Administration  2010-04-21 22:26:34 admin_user@abcdef.com
Test Site ...

8. Click at link by address template    stackoverflow.com

I'm using Selenium for making some work: script should click at link followed by it's own address. For example, there is a method: clickAndWait. I have to pass it ...

9. Selenium problem locating by DOM    stackoverflow.com

I'm trying to use the DOM to locate a form element in Selenium but I can't get it to work. Even if I use the example in the Selenium documentation it ...

10. How to iterate through DOM elements that match a css class using xpath?    stackoverflow.com

I'm processing an HTML page with a variable number of p elements with a css class "myclass", using Python + Selenium RC. When I try to select each node with this xpath:

//p[@class='myclass'][n]
(with ...

11. Strange behavior when applying Array.prototype.slice method to result of querySelectorAll    stackoverflow.com

I'am trying to use jquery's selectors as custom Selenium locate strategy. Exactly as in this article http://johnjianfang.blogspot.com/2009/04/how-to-use-jquery-to-create-custom.html Unfortunatly when I use selenium.click('jquery=a.mylink') method nothing happens. But selenium.click('css=a.mylink') still works perfectly. I did a ...

12. How to find out DOM and CSS address to an element for Selenium?    stackoverflow.com

I have a following element (Login box):

<input type="text" style="font-family: Verdana; font-size: 11px; width: 180px;" id="ctl00_Content_ctl00_Login2_UserName" maxlength="50" name="ctl00$Content$ctl00$Login2$UserName">
Because I have a Firebug, if I right click on on the element it gives ...

13. get element by name by selenium IDE    stackoverflow.com

I'm trying to get element by name, and I have a problem This is a element from amazon site:

<input type="text" style="width: 100%; background-color: rgb(255, 255, 255);" title="Search for" size="50" value="" name="field-keywords" ...

14. is "newPageLoaded" flag? Is it DOM or Networked based?    stackoverflow.com

Can anyone tell me by what means Selenium tests trigger the page load is complete ie "newPageLoaded" flag? Is it DOM based (i.e.document.ready()) or network based?

15. Selenium waitForDOMToLoad()?    stackoverflow.com

Selenium's open command implicitly waits for the whole page to load, including images, etc. How do I just wait for the DOM to load, like jQuery's .ready() method? Currently, I'm ...

16. Complications with Selenium's GetAttribute method    stackoverflow.com

I recently attempted to use selenium RC's GetAttribute method but immediately ran into a challenge. I tried to execute a very simple selenium.GetAttribute("//a/@href") but the code threw a SeleniumException with the ...

17. org.openqa.selenium.webelement to org.w3c.dom.domelement?    stackoverflow.com

Is it possible to convert webdriver/selenium's org.openqa.selenium.webelement to org.w3c.dom.domelement?

18. Random "Element is no longer attached to the DOM" StaleElementReferenceException    stackoverflow.com

I'm hoping it's just me, but Selenium Webdriver seems like a complete nightmare. The Chrome webdriver is currently unusable, and the other drivers are quite unreliable, or so it seems. ...

19. Element locator use in selenium Xpath,CSS, DOM    stackoverflow.com

When to use Xpath , CSS and DOM locator in locating the element in selenium? I want to know the different scenarios to specific use of different locators. Why can not ...

20. Can I tell Selenium to record in DOM mode instead of element ID mode?    stackoverflow.com

I have been using Selenium in my DEV environment. When I go to try some of my recorded tests on my Test environment, I find that the elements have different ...

21. Whats a good way to test Dom heavy js?    stackoverflow.com

I have a bunch of JS code that relies heavily on dom elements. The testing solution I'm using currently relies on selenium, but AFAIK its not possible to properly evaluate js ...

22. FindElement does not return element text unless actually in DOM    stackoverflow.com

I'm using Selenium's webdriver, but I've hit upon a problem. I'm using KnockoutJS to bind my UI to data from the server. In my tests when I call FindElement(By.Id("InputField")) it is ...

23. How do I click on a button in Selenium IDE using only the text associated with the button and not its position?    stackoverflow.com

this is the dom source of the button I want to click on <div class="footer clearFloat"> <div class="left"> ...

24. Selenium react to events    stackoverflow.com

I'm currently using the latest version of Selenium and its .net bindings to perform some tests. Unfortunately I have to simulate some reaction that happens at a variable time and can only ...

25. How to check if dom has a class using WebDriver (Selenium 2)?    stackoverflow.com

I am very new to Selenium, so my apologies if it's a silly question. I have successfully wired up IntelliJ (Play! framework) with Selenium, and created some tests using firefoxDrivers. I'm trying ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.