MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
Problem with JS-function (onload) and execAndWait
Current time: 08-05-2020, 01:37 AM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with JS-function (onload) and execAndWait
01-28-2013, 09:25 PM (This post was last modified: 01-28-2013 09:36 PM by KaiBra.)
Post: #1
Problem with JS-function (onload) and execAndWait

I recently read in the forum, that it is not recommended to use execAndWait with JavaScript involved, unless you really want to measure the method your are calling.

The following problem only occurs on a Server with long responsetimes:
I've got a problem with a page (b) inbetween two pages (A and C), which automatically forwards to page C, when a click on page A is executed (A->b->C).

Measuring A->b->C works fine with IE using execAndWait;.
But when I try the same script using Firefox, measurement stops after loading page b (A->b).

The original script (execAndWait works fine measuring the same site on a faster server (FF and IE) and measuring the same site on the server with long responsetimes using IE.

So the problem only occurs with FF and a server with long responsetimes.
See pictures fastservers.bmp and slowserver.bmp.
Page b looks like this:
function goon() {
location.replace("Page C");
<body onload="goon()">
The script look like this:
logData    0
setCookie    ...
navigate    url
logData    1
execAndWait    document.getElementById('id').click();
Usually it takes about 0.8 secondes to load site b, and everything works fine.
On a different environment though, it takes longer and the measurement stops after page b has been loaded.
It looks like the combination of browser and long responsetimes are responsible for the sudden "measurement-stop" of execAndWait.

Does anyone have an idea for a workaround?
I tried to call goon() after executing the click on A (execAndWait), but this gave me waterfalls with incorrect measurement-times.
I also had a look at the method "setDOMElement", but I couldn't figure out how exactly it works (

Thanks in advance,


(INFO 28/01/2013: Moved thread from "Discuss Test Results" to "WPT - Bugs/Issues")

Attached File(s) Image(s)
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Problem with JS-function (onload) and execAndWait - KaiBra - 01-28-2013 09:25 PM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)