If you have been using AppCheck for a long time you may have GoScripts in use written in the older version 1 of the language.
GoScript v2 introduces new features to allow navigation of more complex login processes, and improves the Scanner's ability to identify and maintain active login sessions.
While v1 GoScripts continue to function within scans, all future GoScripts should be written in v2 as described in A Guide to GoScript, and you will not be able to test your v1 GoScripts in the testing interface at https://scanner.appcheck-ng.com/goscript. If you need to update an existing script and test it in the interface you will need to update it to v2. This is a three step process.
Example v1 GoScript
go: https://www.example.com/login
wait for: Password
username = MyUserName
password = CorrectHorseBatteryStaple
click: loginButton
wait for: Welcome, MyUserName
--
go: https://www.example.com/profile
wait for: Welcome, MyUserName
Step 1
Indent the entire script; it is your choice whether to use spaces or tabs, so long as it is consistent within the script:
go: https://www.example.com/login
wait for: Password
username = MyUserName
password = CorrectHorseBatteryStaple
click: loginButton
wait for: Welcome, MyUserName
--
go: https://www.example.com/profile
wait for: Welcome, MyUserName
Step 2
Add the line def auth.login at the top of the script (not indented):
def auth.login
go: https://www.example.com/login
wait for: Password
username = MyUserName
password = CorrectHorseBatteryStaple
click: loginButton
wait for: Welcome, MyUserName
--
go: https://www.example.com/profile
wait for: Welcome, MyUserName
Step 3
Replace the -- line with def auth.confirm (remove the indentation from this line):
def auth.login
go: https://www.example.com/login
wait for: Password
username = MyUserName
password = CorrectHorseBatteryStaple
click: loginButton
wait for: Welcome, MyUserName
def auth.confirm
go: https://www.example.com/profile
wait for: Welcome, MyUserName
Comments
0 comments
Article is closed for comments.