ERROR: Couldn't access document.body. Is this HTML page fully loaded?

338 views
Skip to first unread message

santhosh venkat

unread,
Nov 29, 2011, 3:43:48 AM11/29/11
to seleniu...@googlegroups.com
Hi All

I am getting the following exception. 

com.thoughtworks.selenium.SeleniumException: ERROR: Couldn't access document.body.  Is this HTML page fully loaded?
        at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
        at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
        at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262)
        at com.thoughtworks.selenium.HttpCommandProcessor.getBoolean(HttpCommandProcessor.java:335)
        at com.thoughtworks.selenium.DefaultSelenium.isTextPresent(DefaultSelenium.java:499)


I checked my code and am sure the HTML content is loaded fully.  

how to fix this ?

Krishnan Mahadevan

unread,
Nov 29, 2011, 3:55:33 AM11/29/11
to seleniu...@googlegroups.com
What version of Selenium ?
Also please include if you are working with DefaultSelenium or WebDriverBackedSelenium ?

How are you ascertaining that the page is loaded completely ?

Can you share the code snippet that is causing the below exception ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

santhosh venkat

unread,
Nov 29, 2011, 4:09:35 AM11/29/11
to seleniu...@googlegroups.com
I am using selenium RC and working with Defaultselenium.

during my previous regression testing with the same set of code it worked properly. However it is suddenly throwing this exception today.


selenium.click("link=Changes");
selenium.waitForPageToLoad("30000");
selenium.click("link=major change for HDFC account");
selenium.waitForPageToLoad("30000");
selenium.click("link=Edit");
selenium.waitForPageToLoad("30000");
selenium.select("name=STAGEID", "label=Planning");
selenium.select("id=TECHNICIANID", "label=administrator");
selenium.select("name=CATEGORYID", "label=Software");
selenium.select("name=SUBCATEGORYID", "label=Adobe Reader");
selenium.select("name=ITEMID", "label=Install");
selenium.select("name=CHANGETYPEID", "label=New Change Type");
selenium.select("name=IMPACTID", "label=Affects Business@#$");
selenium.select("name=URGENCYID", "label=Low");
selenium.select("name=PRIORITYID", "label=Medium");
selenium.click("css=img.add-items");
selenium.click("id=SERVICES1");
selenium.click("id=SERVICES2");
selenium.click("id=SERVICES3");
selenium.click("css=button.formStylebuttonAct");
selenium.click("name=UDF_CHAR3");
selenium.select("name=UDF_CHAR3", "label=2");
selenium.click("name=UDF_CHAR2");
selenium.type("name=UDF_CHAR2", "q");
selenium.click("name=Sub");

santhosh venkat

unread,
Nov 29, 2011, 4:12:08 AM11/29/11
to seleniu...@googlegroups.com
Also is there a way to find the exact version of the selenium that am using ?

Krishnan Mahadevan

unread,
Nov 29, 2011, 4:18:25 AM11/29/11
to seleniu...@googlegroups.com
Take a look at your lib folder (incase you added up jars manually to it, and configured your IDE [eclipse for e.g.,] to refer to it) (or) if you are using Maven, open up your pom file and take a look at it there.




Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


santhosh venkat

unread,
Nov 29, 2011, 4:22:27 AM11/29/11
to seleniu...@googlegroups.com
version=1.0.1
groupId=org.seleniumhq.selenium.client-drivers
artifactId=selenium-java-client-driver

santhosh venkat

unread,
Nov 29, 2011, 5:35:17 AM11/29/11
to seleniu...@googlegroups.com
Any updates ? Am using version 1.0.1

Smita Sinha

unread,
Nov 29, 2011, 6:08:19 AM11/29/11
to seleniu...@googlegroups.com
your error is coming on isTextPresent and the code you have given here
does not have isTextPresent.
Are you sure that the code snippet you have given is the one throwing the error.

Thanks,
Smita

On Tue, Nov 29, 2011 at 4:05 PM, santhosh venkat

santhosh venkat

unread,
Nov 29, 2011, 6:25:26 AM11/29/11
to seleniu...@googlegroups.com
Yes this is the code.
There is no verification for this.
Reply all
Reply to author
Forward
0 new messages