MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - scripted test times out in Chrome/FF

WebPagetest Forums

Full Version: scripted test times out in Chrome/FF
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using WPT Server and Agents in version 2.5. I've set up some windows 7-agents with IE8, Chrome and FF7. I am running the following script:

logData    0
clickAndWait id=TconHrefModul_02
logData    1
setValue    name=fh_search    shirt
clickAndWait    id=top_search_submit

IE8 works fine and provides valid results. The wptdriver-controlled browsers Chrome and FF7 do not run the tests completely and time out. I've tried the script with the public instance on, location Dulles. Unfortunately with the same result:

Is there a way to get the logging of wptdriver? Any ideas why the scripts aren't running?

Thanks in advance,
FF7 runs the navigate and the first clickAndWait, the input-element with name-attribute "fh_search" gets the focus and FF seems to hang-up.
Chrome doesn't perform the first clickAndWait.
With FF7 I see many requests to google-safebrowsing (til timeout) in detailed results. Even if I disable safebrowsing by setting browser.safebrowsing.enabled and browser.safebrowsing.malware.enabled to false these requests arise!?
sorry, script debugging kind of sucks right now. I have it on our to-do list to build a chrome extension that lets you test out scripts in a browser but haven't had time to get to it. I'll take a look at debugging it today.

Do you know if the element is inside of an IFrame? It's possible that the Chrome and Firefox extensions are not (or can not) reaching inside of IFrames but the IE agent does. The other possibility is just in how the events are fired.
No IFrames on the pages. It would be great if you get around to debug that for me, thanks in advance!
Hate to do it to you, but you might be better off using execAndWait with javascript (at least for now). Clock sends a click event to elements but that doesn't trigger anchor tags to load the href (at least in chrome).

We can see about having it cascade to navigating href if the click event doesn't work but in the meantime something like this should work:

logData    0
execAndWait    window.location=document.getElementById('TconHrefModul_02').href;
logData    1
setValue    name=fh_search    shirt
submitForm    id=topSearch
Thanks a lot for the quick answer and for the tip with execAndWait and the execution of javascript!

But especially with anchor tags we have a problem adressing them with Javascript. Just few of them have id's :-(
With wpt-script-command clickAndWait we can use attributes like name or even alt to adress the anchor tag.

Regards, Nils
I opened a bug so we'll get it working but short-term I don't think there are alternatives other than writing custom js.
OK, thanks. For me that's not a high-priority-bug. We've thought about it and we'll get the most of our relevant elements adressed via javascript/jquery.

something special to regard, using jQuery-Calls in WPT-Scripts for wptdriver-controlled browsers?

execAndWait    document.getElementById('TconHrefModul_02').click();
exec    document.getElementById('searchValue').value='shirt';
execAndWait    document.getElementById('top_search_submit').click();
execAndWait    $("img[alt='Laura Scott Shirt (2 Stck.)']")[0].click();

works in IE8 but not in Chrome/FF7.

Regards, Nils
Shouldn't be but when I try running those commands in the dev console in Chrome they don't work (largely because you can't call click from javascript). The first command comes back with:

TypeError: Object;sid=RHREFl272y7-FBNL6qR8fzGxykWV3iv9omFWbp5OAXI76tuwzF429Yo5AXI76qLnpx2i_dOj has no method 'click'

The great thing with the exec commands is that you can debug them directly in the browser's dev tools console :-)
Reference URL's