Thursday, 26 September 2013

JavaScript Selenium script Validation - WPM [BrowserMob]

Configure Neustar Script Recorder

1| Log into WPM
2| Scripting > Scripting Overview
3| Install the Neustar Script Recorder "(xpi)
4| Launch Selenium IDE
5| Click menu Neustar > Options... [Obtain API Key and API Secret using WPM profile]
6| Go to 'My Account'.
7| Click Users > Manage 
8| Get API details and fill up Neustar connection options
9| Upload the scripts to WPM from Selenium IDE | 'Upload to Neustar' icon next to 'Click to Record'
10| Scripting > Scripting Overview
11| Click on Untitled and copy the js script generated.
12| Create a new text file & paste the script
13| Save as .js format. e.g., html.js

JavaScript validator

1| Download local-validator
2| Unzip on location C:\local-validator\local-validator-4.11.57
3| Go to C:\Users\username
4| Create a file
5| Paste the following and save it
FF=C:\\Program Files\\Mozilla Firefox\\firefox.exe
6| Open cmd prompt
7| Move to validator bin folder
C:\local-validator\local-validator-4.11.57\bin>validator.bat D:\html.js -browser FF
8| Click enter to execute the Javascript file.

1 comment: