WebPagetest Forums
Webpagetest Scripting - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Webpagetest Scripting (/showthread.php?tid=13747)



Webpagetest Scripting - jiangyurong609@gmail.com - 05-30-2015 06:18 AM

I find the scripting is not able to complete some actions.

For example, for clicking the href link, the webpagetest script is not able to perform the action if there is no id, name or title associated. To be specific:
in http://www.amazon.com, a link of "Office supplies" is shown in source code like this:

<li><a href='/b/ref=s9_acss_gw_ct_B2BGenBu_ct1_a1?_encoding=UTF8&node=1069242&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=desktop-2&pf_rd_r=0W3W05N8HWPW4CBRVVWV&pf_rd_t=36701&pf_rd_p=2084861362&pf_rd_i=b2b-desktop'>Office Supplies</a></li>

I know selenium use link=Office Supplies to identify the click, but in webpagetest, how to specify this? Is there any way to accomplish this?

Moreover, is there anyway to convert the selenium script to webpagetest script? If not, how we can enable selenium on our private instances? Can you give some hint?

Thanks


RE: Webpagetest Scripting - andydavies - 06-04-2015 05:53 PM

You could use the exec or execAndWait with some JS to click the link i.e. find the DOM node then issue .click() against it.

DevTools is great for checking the JS in first