Current time: 10-16-2019, 03:15 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scripted test times out in Chrome/FF
12-14-2011, 06:48 PM (This post was last modified: 12-14-2011 07:41 PM by nilskuhn.)
Post: #1
scripted test times out in Chrome/FF
Hi,
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:

Code:
logData    0
navigate    http://www.otto.de
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 webpagetest.org, location Dulles. Unfortunately with the same result:
ie8
http://www.webpagetest.org/result/111214_VG_2GV32/
FF7
http://www.webpagetest.org/result/111214_6Q_2GV15/
chrome
http://www.webpagetest.org/result/111214_ZP_2GTSD/

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

Thanks in advance,
Nils
Addition:
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!?
Find all posts by this user
Quote this message in a reply
12-15-2011, 12:57 AM
Post: #2
RE: scripted test times out in Chrome/FF
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-15-2011, 01:07 AM
Post: #3
RE: scripted test times out in Chrome/FF
No IFrames on the pages. It would be great if you get around to debug that for me, thanks in advance!
Find all posts by this user
Quote this message in a reply
12-16-2011, 04:00 AM
Post: #4
RE: scripted test times out in Chrome/FF
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:

Code:
logData    0
navigate    http://www.otto.de
execAndWait    window.location=document.getElementById('TconHrefModul_02').href;
logData    1
setValue    name=fh_search    shirt
submitForm    id=topSearch
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2011, 06:30 AM (This post was last modified: 12-16-2011 06:30 AM by nilskuhn.)
Post: #5
RE: scripted test times out in Chrome/FF
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
Find all posts by this user
Quote this message in a reply
12-17-2011, 12:08 AM (This post was last modified: 12-17-2011 12:08 AM by pmeenan.)
Post: #6
RE: scripted test times out in Chrome/FF
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.

http://code.google.com/p/webpagetest/iss...tail?id=47
Visit this user's website Find all posts by this user
Quote this message in a reply
12-17-2011, 12:17 AM
Post: #7
RE: scripted test times out in Chrome/FF
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.
Find all posts by this user
Quote this message in a reply
12-20-2011, 10:25 PM
Post: #8
RE: scripted test times out in Chrome/FF
Hi,

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

Code:
navigate    http://www.otto.de/
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
Find all posts by this user
Quote this message in a reply
12-21-2011, 01:53 AM
Post: #9
RE: scripted test times out in Chrome/FF
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:

Code:
TypeError: Object http://www.otto.de/Damen/shop-de_bc_sh1458583/;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 :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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