Skip to content

Editing Test Scripts with QaSCRIBE

Before you read this article you may want to see:

Main Article

Edit test scripts that have been created with QaSCRIBE.

Let us take the following test script that searches for the book 'Steve Jobs' by Walter Isaacson:

This test script opens amazon.com and searches for 'steve jobs biography' under Books. It then looks for the book titled 'Steve Jobs' in the search results, clicks on the link to the book, and then adds it to the cart.

 

Let's say you want to modify this script to verify that this book is written by Walter Isaacson before you select it. You can see from the Amazon screen with the search results shown below that there is another link (highlighted) with a link name Walter Isaacson and a display text of Walter Isaacson.  

You just need to look for this text and the link to verify that you have the correct author. This will require you to add another instruction between the 5th and the 6th instruction in the script shown above.

There are two ways to do this.

Approach 1

Step 1:  You can add the new instruction by clicking on the 'Add' icon which is available on the 5th instruction as shown below:


This allows you to add Command, Target, and Value for the respective instruction between the 5th and 6th instructions. 

Step 2: Now you can view a grid with the Command Details Pane and type in waitForText in the Command field, link=Walter Isaacson in the Target field and Walter Isaacson in the Value field as shown below:


This adds the instruction to verify that Walter Isaacson is the author of the book.

Step 3: Save the script and you are done!


Approach 2


Step 1: Place your cursor on the 5th instruction (click 
xpath=(//*[text()="Steve Jobs"])[2]) as mentioned above and turn on the recording button.


Step 2: In the search results, shown on the browser right-click on the highlighted text Walter Isaacson.  Select the command to verify that the link shows Walter Isaacson. This inserts the instruction in the script next to the 5th instruction.

  

Step 3: Turn off the recording. Save the script and you are done!



Feedback and Knowledge Base