WebPagetest Forums
how to script the typeahead field ? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: how to script the typeahead field ? (/showthread.php?tid=15153)



how to script the typeahead field ? - svg - 12-02-2017 02:51 PM

Hi,

I am trying to automate a workflow for getting the performance metrics and currently blocked on the typeahead fields where i can enter the text, but the values dont appear.

Something similar to the one attached. Any help would be highly appreciated.

I tried something like this, but it not work as expected;

document.getElementById(<id>).value="bank";$(<id>).set("text\n");


Thanks !


RE: how to script the typeahead field ? - andydavies - 12-04-2017 09:56 PM

I've done something similar before and will dig out my notes - I sent keystrokes to an autocomplete field

Is the page you're trying to test publicly accessible?


RE: how to script the typeahead field ? - svg - 12-05-2017 02:16 AM

Thanks Andy that would be really helpful if you can provide some insights. Currently it is not publicly accessible.


RE: how to script the typeahead field ? - andydavies - 12-09-2017 03:14 AM

Slide 37/38/39 of this deck should give you some ideas - https://docs.google.com/presentation/d/1UgvmekxmQyrxGTgjWKa4s9OXiYXJ6oJTFis5wiC74Jk/edit?usp=sharing

It uses jQuery which was already on the page but native JS could be used instead