Incorrect document.readyState #14717

Open
zhiying8710 opened this Issue Dec 22, 2016 · 0 comments

Projects

None yet

1 participant

@zhiying8710
zhiying8710 commented Dec 22, 2016 edited
  1. Which version of PhantomJS are you using? Tip: run phantomjs --version.
    2.1.1

  2. What steps will reproduce the problem?

    1. I'm using it with Selenium. use document.readyState to check page load compelte or not.
    2. visit a site(like hotmail.com) first, when load complete, current document.readyState's value is complete.
    3. then fill the username and password, click the login button, in short time, document.readyState's value is still complete, then it changes to loading, and complete. It makes my code doesn't work fine. I also use chrome to run the code, it works just fine.
  3. Which operating system are you using?
    CentOS 6.5

  4. Did you use binary PhantomJS or did you compile it from source?
    binary

  5. Please provide any additional information below.
    after click the login button, I logged current document.readyState's value every 200 milliseconds:
    2016-12-22 14:42:39,961 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:40,166 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:40,371 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:40,577 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:40,783 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:40,988 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:41,193 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:41,398 [pool-6-thread-1] WARN :- current document.readyState: loading
    2016-12-22 14:42:41,603 [pool-6-thread-1] WARN :- current document.readyState: loading
    2016-12-22 14:42:41,809 [pool-6-thread-1] WARN :- current document.readyState: loading
    2016-12-22 14:42:42,014 [pool-6-thread-1] WARN :- current document.readyState: loading
    2016-12-22 14:42:42,220 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:42,424 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:42,632 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:42,837 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:43,042 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:43,247 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:43,468 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:43,674 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:43,879 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:44,084 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:44,289 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:44,493 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:44,697 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:44,903 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:45,107 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:45,312 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:45,517 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:45,722 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:45,927 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:46,132 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:46,337 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:46,542 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:46,746 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:46,953 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:47,157 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:47,362 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:47,567 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:47,772 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:47,977 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:48,182 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:48,387 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:48,592 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:48,797 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:49,002 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:49,207 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:49,412 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:49,617 [pool-6-thread-1] WARN :- current document.readyState: complete
    2016-12-22 14:42:49,822 [pool-6-thread-1] WARN :- current document.readyState: complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment