WebPagetest Forums
Unable to navigate through script - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: Unable to navigate through script (/showthread.php?tid=15380)



Unable to navigate through script - venkatakurathi - 05-25-2018 08:19 PM

Hi Respected Members,
I am having some issues with running a workflow using the script.
I am working with a react application & here is the workflow I am trying to achieve.
I am running wpt private instance.

Launch Application - Navigate <URL>

Click Login Button to navigate to the login page - execAndWait document.querySelector('.selector').click()

Enter cred & click the login button -
exec document.querySelector('.username').value="username"
exec document.querySelector('.password').value="password"
execAndWait document.querySelector('.submit').click()

upon successful login click on logout - execAndWait document.querySelector('.logout’).click()

I am unable to click the submit button[on page 2] when I m running the above script, but the same works if I directly navigate to that login page & execute the commands.
i.e. the below works fine
Navigate <URL>/login
exec document.querySelector('.username').value="username"
exec document.querySelector('.password').value="password"
execAndWait document.querySelector('.submit').click()

Please suggest what I am doing wrong & I want to measure the timings under a single workflow.

Any help would be highly appreciated.