Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

WaitForPageToLoad throw exception in Google Chrome #653

Closed
lukeis opened this issue Mar 2, 2016 · 10 comments
Closed

WaitForPageToLoad throw exception in Google Chrome #653

lukeis opened this issue Mar 2, 2016 · 10 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 653

What steps will reproduce the problem?

1. When run test cases using waitForPageToLoad in GoogleChrome, it is not stable, usually
throw exception:(Testing url:http://homestyler.com)
The same case can run smoothly under IE and Firefox
Test case:
    public void testFilterByTags()throws Exception
    {
         selenium.open("http://homestyler.com/gallery/all/mostrecent");
        selenium.waitForPageToLoad("30000");
        //click filter by tags...
        selenium.click("//div[@id='filterdd']/span");
        Thread.sleep(sleepTime);
        //click tag: family room
        selenium.click("tag2-4");
        //click tag: living room
        selenium.click("tag2-8");

        //click apply tag
        selenium.click("//span[@onclick='return adsk.drgGallery.applyFilters();']");
        Thread.sleep(1000);
        selenium.waitForPageToLoad("30000");
        Thread.sleep(sleepTime);


        String tagTxt1=selenium.getText("//ul[@id='activeTagsBar']/li[@id='1_1']/span");
        assertTrue("Family room tag is not applied!",tagTxt1.equals("Family Room"));

        String tagTxt2=selenium.getText("//ul[@id='activeTagsBar']/li[@id='1_2']/span");
        assertTrue("Living room tag is not applied!",tagTxt2.equals("Living Room"));




        //clear family room tag
        selenium.click("1_1");
        Thread.sleep(sleepTime);
        selenium.waitForPageToLoad("30000");
        Thread.sleep(sleepTime);

        //verify the search results should be more than when two tags applied



        //clear all tags
        selenium.click("//li[@id='clearAllTagsID']/span");
        Thread.sleep(1000);
        selenium.waitForPageToLoad("30000");
        Thread.sleep(sleepTime);



    }

What is the expected output? What do you see instead?

com.thoughtworks.selenium.SeleniumException: Object [object HTMLIFrameElement] has
no method 'getCurrentWindow'
    at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
    at com.thoughtworks.selenium.DefaultSelenium.waitForPageToLoad(DefaultSelenium.java:653)
    at com.autodesk.homestyler.GalleryTest.testFilterByTags(GalleryTest.java:336)
... Removed 22 stack frames


What version of the product are you using? On what operating system?
WinXP
selenium-server-1.0.1
selenium-java-client-driver-1.0.1
Chrome 5.0.375.99

Please provide any additional information below.

Reported by ygao1982 on 2010-07-16 04:45:46

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by simon.m.stewart on 2011-01-21 14:36:44

  • Labels added: Component-Core, comp, Browser-Chrome

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by jari.bakken on 2011-01-27 01:21:21

  • Labels removed: comp

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I've the same Problem with

WinXP
selenium-server-1.0.3 and selenium-server-2
Google Chorme 9.0

Reported by mp.keweloh on 2011-03-04 13:18:25

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Has anyone found a solution for this?

Reported by anabelina@kentriki.com on 2011-03-30 19:22:44

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hello everybody,

I've got the same issue with:
WinXP
selenium-server-1.0.3
Google Chrome 10.0

The error message is as following: 
Got result: Object [object HTMLIFrameElement] has no method 'getCurrentWindow' on session...

The same code run ok with FF and IE

Reported by songyiwei on 2011-04-01 21:02:51

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

We have the same issue with some of our Selenium tests.

Reported by nicolas.roumiantzeff on 2011-06-13 15:26:37

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Using WebDriverBackedSelenium with the latest version of ChromeDriver (http://code.google.com/p/chromium/downloads/list),
I was able to run the test without any problems (after changing //span to //a for the
apply button).

Reported by kkania@google.com on 2011-10-04 19:31:30

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by kkania@google.com on 2012-01-27 22:37:54

  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

We recommend using the WebDriverBackedSelenium for RC tests using Google Chrome. Closing
as WontFix as there's not an obvious fix for this, and the development team are focused
on Selenium 2 development, and notably the WebDriver APIs.

Reported by simon.m.stewart on 2012-02-20 21:40:28

  • Status changed: WontFix

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 17:49:41

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant