![]() |
Question regarding setDOMElement - Printable Version +- WebPagetest Forums (https://www.webpagetest.org/forums) +-- Forum: Web Performance (/forumdisplay.php?fid=3) +--- Forum: Discuss Test Results (/forumdisplay.php?fid=4) +--- Thread: Question regarding setDOMElement (/showthread.php?tid=12004) |
Question regarding setDOMElement - KaiBra - 01-25-2013 02:10 AM 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 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_WN_GFX/1/details/ Regards, Kai RE: Question regarding setDOMElement - pmeenan - 01-29-2013 01:16 AM 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_HT_ff681f989418254c261f157d2dbbef6a/ 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/issues/detail?id=138&thanks=138&ts=1359386161 RE: Question regarding setDOMElement - Marek - 02-13-2013 10:59 PM 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 RE: Question regarding setDOMElement - pmeenan - 02-14-2013 04:25 AM You have to build a debug version and then the trace messages are viewable in dbgview. They are compiled out in release builds. RE: Question regarding setDOMElement - Marek - 02-19-2013 07:26 PM The new Revision you commited Wednesday (13.02.2013) fixed this issue. Thank you very much! RE: Question regarding setDOMElement - Marek - 03-01-2013 01:59 AM 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) { Do Firefox Tests use WptHook.dll? / Did WptTrace's "OutputDebugString" generate any Output in injected DLLs under Win7 x86 ? RE: Question regarding setDOMElement - pmeenan - 03-01-2013 02:31 AM 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. RE: Question regarding setDOMElement - Marek - 04-23-2013 07:18 PM I could get "setDomElement" working in Firefox with one code line: See comment in https://code.google.com/p/webpagetest/issues/detail?id=138 The "WptDriver"-Firefox-Extension is able handle a setDomElement command. Thank you for helping me with debugging! RE: Question regarding setDOMElement - pmeenan - 04-24-2013 12:18 AM Thanks for the pointer/patch. I'll get it added to the main codebase later today. RE: Question regarding setDOMElement - marcelduran - 05-16-2013 04:25 AM 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/ |