I am using WebDriver not to test but to do routine things like find out my account balance.
In doing that, I had some not found elements and I iterate though the windows and was able to log in.
Now that I have logged in, I have used find by id, find by xpath, find by class and the object is not found to get my balance that is on the page (at least I can view it and it is in firebug). I printed out the page source but the page source only has the initial source without javascript modifications.
I tried to get the inner html via javascript of the body and it still gave me the html that you get with page source.
Is it possible that WebDriver is not accessing the DOM?
All the posts that I have seen say you have to wait long enough and I have an implicit wait of 30 seconds. I tend to think it is not a waiting problem.
When I use firebug, I see the elements, that is how I got the xpath. But it can't find it with xpath.
I would even be satisfied if I could just save the source (generated by javascript) into a file where all the elements exist.
I used it with firefox and windows xp sp3.
I loop through iframes with this code
List <WebElement> framesList = driver.findElements(By.xpath("//iframe"));
for(WebElement frame:framesList){
element = driver.findElement(By.className("account-balance"));
String et= element.getText();
System.out.println(et);
}
System.out.println("frames:" + framesList.size());
I get frames:0 it detects no frames.