Cryptzone Support

If you wish to submit a support ticket please sign in to your customer portal or use the “submit a ticket” button at the top menu.
If you need to find documentation about our Sheriff Suite please login to the Hive- Click Here



How to Troubleshoot Selenium Scripts

« Go Back

How to Troubleshoot Selenium Scripts

One of the advantages of using Compliance Sheriff is the ability to leverage transaction scripts. This allows Compliance Sheriff to scan content that involves user interaction such as logging in through a portal, filling out a web form application, or even the process of purchasing a product online. This is one of the main reasons that Compliance Sheriff is used to scan against just about any web content one can imagine. When used correctly, a transaction script can be used for many different types of target content, but in order to get a script to work correctly for your specific project, there is a specific "trial and error" process involved, and this article will walk you through that process.

  1. Install Selenium along with the "ComplianceSheriff Add-ON" toolbar. You can find links to the download pages from within Compliance Sheriff, on each scan page next to the "Transaction Script" section, where it says "see instructions": Once you have Selenium installed your client, you'll need to create your first script. Generally we recommend something basic, with only a few lines for the intial testing. If you haven't run Selenium yet in your environment, you may want to read this kb article first:
Transaction Scripts See Instructions
:2. The script that you have copied into your scan configuration page should look similar to this:
Example of Selenium Script

3. Save and then run your scan. Once the scan has completed, the first thing to do is check the Scanlog by clicking the word "completed" under the status column:
Status Column click the word Completed

4. While viewing the scan log, look for any red "x"'s , such as the following:
Selenium Failed to find element message

5. In the above example I was attempting to scan through the login process of my gmail account. This scan log is telling me that the scan engine "couldn't find control id = Email". This means that the script failed at this exact point, and could therefore not go any farther. I need to go back to my Selenium script and try a different command, like so:
Selenium Target and Command example

TIP -- Look closely at your Selenium IDE window, and locate the area below with the three sections "Command", Target" , and "Value". See the drop down arrows next to the "target" and "command" fields"? Selenium will give you several options for each, and I'll be changing the "target" value in my next step.

6. First I locate the line of code where it has my "ID=Email"  target. Then I'll click the little drop down arrow next to the "target" section below, to find a different target variable.

Once I have a new target variable, I'll recopy my script, run another scan, and check the scan log again. This is basically what this "Trial and Error" script recording process is all about.

  • Record a script and play it back in selenium to make sure it works
  • Use the Compliance Sheriff Add-On "clipboard" top copy the script
  • Run the scan
  • Check the "Status" log by clicking the word "Completed"
  • Look for any red "x"'s -- these will be the stopping point of the scan
  • Change the element that failed by adjusting the "target" value within Selenium
  • Run the scan again 


Article Info
2/18/2017 5:45 PM
2/18/2017 5:56 PM



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255