Script not working on Firefox/Safari
|
06-02-2014, 10:04 PM
Post: #1
|
|||
|
|||
Script not working on Firefox/Safari
Hi,
I'm trying to run a simple login test using IE/Chrome/Firefox/Safari. But i'm getting really inconsistent data. Generally, the script works on IE and Chrome and doesn't on Firefox and Safari. When it works, it logs in, when it doesn't work, I can see the user name and password fields are populated, but it appears the form doesn't get submitted. Any ideas? Thanks, Rich //test new site! logData1 navigate http://www.first-utility.com // off to the login page... navigate https://www.first-utility.com/login //login logData 1 setValue name=LogonForm[uid] username setValue name=LogonForm[pwd] password submitForm id=frmLogon //have also tried submitForm name=logon Example test runs: Chrome: http://www.webpagetest.org/result/140602_7D_CD8/ http://www.webpagetest.org/result/140602_MG_DX0/ Firefox: http://www.webpagetest.org/result/140602_KY_CK0/ http://www.webpagetest.org/result/140602_2A_DFC/ |
|||
06-02-2014, 11:28 PM
Post: #2
|
|||
|
|||
RE: Script not working on Firefox/Safari
Scripts can only have one step that produces data (https://sites.google.com/a/webpagetest.o...cripting), so you're first step should have logData 0 before it
You could try using execAndWait document.getElementById('frmLogon').click() to submit the form to see if it makes any difference. Andy Using WebPageTest - http://usingwpt.com/ |
|||
06-03-2014, 12:06 AM
Post: #3
|
|||
|
|||
RE: Script not working on Firefox/Safari
Hi,
I had been trying it with both 0 and 1 and saw the same behaviour. I've set it to 0 now but confirm I still see the same problem - firefox is not logging in. Thanks Rich |
|||
06-03-2014, 06:07 AM
Post: #4
|
|||
|
|||
RE: Script not working on Firefox/Safari
Try doing the form submission with javascript using the execAndWait command. Or better yet, the form fill and submit through script all in one step). That way you can debug locally with firefox and make sure it works before running on WPT (pretty much what Andy recommended).
If pages have pre-submit script that needs to run the behavior can really be tough to debug using the regular commands. |
|||
06-03-2014, 07:12 AM
Post: #5
|
|||
|
|||
RE: Script not working on Firefox/Safari
Ah, I see. Ok I'll give it a go and see how I get on.
Thanks again! |
|||
05-28-2015, 11:43 PM
Post: #6
|
|||
|
|||
RE: Script not working on Firefox/Safari
Hi,
I am having a similar issue, in which tests works in Firefox but not in Chrome or IE. I have confirmed that document.querySelector(<selector>).click() works in Chrome Developer Tools. Any suggestions? (06-03-2014 07:12 AM)richiemarshall Wrote: Ah, I see. Ok I'll give it a go and see how I get on. |
|||
12-10-2015, 08:19 AM
(This post was last modified: 12-10-2015 08:20 AM by waem445.)
Post: #7
|
|||
|
|||
RE: Script not working on Firefox/Safari
Can confirm. I'm seeing the similar behavior on the browsers.
I tried using the script, submitForm etc. which did not work trying each of these steps on debug console in developer tools - works fine. navigate mydomain.com/path exec document.getElementById('email').value ="myemail@domain.com" exec document.getElementById('password').value ="password" execAndWait document.querySelector('#login-button').click() document.querySelector works sometimes on Firefox, either on first view or on repeat view. Never together. Chrome, IE & Safari doesn't work. document.getElementById('login-button').click() -- doesn't work either -- What I see on the agent is that the browser doesn't wait around for the login to complete if I add a wait time after the click, the browser takes 10 minutes to finish the test, but the results of post login page are not recorded. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)