Current time: 11-29-2014, 01:38 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question regarding setDOMElement
01-25-2013, 02:10 AM (This post was last modified: 01-25-2013 02:11 AM by KaiBra.)
Post: #1
Question regarding setDOMElement
Hey,
can anyone explain to me how the command "setDOMElement" works in detail?

I tried to understand its behaviour using the example from the documentation:
Code:
setDOMElement    name=loginId
navigate    http://webmail.aol.com

If I execute this script, the test times out...
The DOM element with "name=loginId" does exist on "http://webmail.aol.com"!

See:
http://www.webpagetest.org/result/130124...1/details/

Regards,

Kai
Find all posts by this user
Quote this message in a reply
01-29-2013, 01:16 AM
Post: #2
RE: Question regarding setDOMElement
I think it's a bug specific to the Firefox/Chrome implementation. It appears to work correctly in IE: http://www.webpagetest.org/result/130128...d2dbbef6a/

Basically, the code polls the DOM on a regular basis looking for the specified DOM element and it records the time when it becomes available and marks it with a vertical orange line in the waterfall. It also holds the end of the test until it becomes available (or times out).

I opened an issue to track it: http://code.google.com/p/webpagetest/iss...1359386161
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2013, 10:59 PM
Post: #3
RE: Question regarding setDOMElement
Hi,
KaiBra forwarded this issue to me. Is there a way to debug/log/trace wptDriver?

In the source code if found methods like "WptTrace" and a "wpt.log" in "WptSettings::load". Logging with WinDbg ist quite complicated due to tight system integration by dlls.

Kind Regards,
Marek
Find all posts by this user
Quote this message in a reply
02-14-2013, 04:25 AM
Post: #4
RE: Question regarding setDOMElement
You have to build a debug version and then the trace messages are viewable in dbgview. They are compiled out in release builds.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-19-2013, 07:26 PM
Post: #5
RE: Question regarding setDOMElement
The new Revision you commited Wednesday (13.02.2013) fixed this issue. Thank you very much!
Find all posts by this user
Quote this message in a reply
03-01-2013, 01:59 AM
Post: #6
RE: Question regarding setDOMElement
The trace messages are only viewable until WptDriver cleans up (WptDriverCore::CleanUp()). Trace messages I'm interested in are those from "WptHook.dll" (e.g. see below "WptTest::ProcessCommand"), when running Firefox (17 and up) tests. I've been trying for quite a long time, but couldn't find any solution to let the WptTrace-Messages appear in DebugView / WinDbg. Creating own log files failed also.

Code:
bool WptTest::ProcessCommand(ScriptCommand& command, bool &consumed) {
  bool continue_processing = true;
  consumed = true;

  WptTrace(loglevel::kFunction, _T("[wpthook] Processing Command '%s'\n"),
                                                              command.command);
  CString cmd = command.command;

Do Firefox Tests use WptHook.dll? / Did WptTrace's "OutputDebugString" generate any Output in injected DLLs under Win7 x86 ?
Find all posts by this user
Quote this message in a reply
03-01-2013, 02:31 AM
Post: #7
RE: Question regarding setDOMElement
Yes, they do. In DbgView make sure you have "Capture Global" checked. You will need to launch it "as administrator" if you are on Windows Vista or later.

wpthook.dll is injected into the browser process so you'll be getting the messages from that process, not from the wptdriver process.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-23-2013, 07:18 PM
Post: #8
RE: Question regarding setDOMElement
I could get "setDomElement" working in Firefox with one code line:
See comment in https://code.google.com/p/webpagetest/is...ail?id=138

The "WptDriver"-Firefox-Extension is able handle a setDomElement command.

Thank you for helping me with debugging!
Find all posts by this user
Quote this message in a reply
04-24-2013, 12:18 AM
Post: #9
RE: Question regarding setDOMElement
Thanks for the pointer/patch. I'll get it added to the main codebase later today.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2013, 04:25 AM
Post: #10
RE: Question regarding setDOMElement
Is that fixed for Chrome and IE10 as well? Just run a simple script test:

setTimeout 20
setEventName test
setDOMElement id=main
navigate http://www.webpagetest.org

and got:

Chrome: timeout http://www.webpagetest.org/result/130515_P8_TVP/
Firefox: ok, but *dom element* occurred before *start render* http://www.webpagetest.org/result/130515_GV_TVX/
IE 9: ok http://www.webpagetest.org/result/130515_6C_V00/
IE 10: timeout http://www.webpagetest.org/result/130515_1X_TW6/
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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