WebPagetest Forums

Full Version: How to test a website that requires a username and password to log in???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Big GrinBig Grin
Hello!
I want to [/size]and jump to a sub-page after successful login, but I don't know how to write script statements. Can someone help me? Be deeply grateful.

Here's what I wrote:

navigate https://smartcity.baidu.com
setValue name=userName ******
setValue name=password ******
execAndWait $(document.getElementsByClassName('pass-button-submit')[0]).submit()
navigate https://smartcity.baidu.com/od/regionPortrait
If setValue doesn't work, try setting it using JS, its been more reliable in my testing
Reference URL's