0% found this document useful (0 votes)
117 views

Automation Tips and Tricks Exercise Workbook

Uploaded by

Rahul Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views

Automation Tips and Tricks Exercise Workbook

Uploaded by

Rahul Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Learn along with Experts

Tosca automation tips and tricks

This workbook is designed to provide detailed instructions to learn various


automation tips and tricks of Tosca.

1. Assignment Prerequisites

• Access to Tosca Commander version 13.0 or above with valid Tosca DI license
• Automation Specialist Level 1 and 2
• Login access to http://demowebshop.tricentis.com/

2. Disclaimer

Information in this document is subject to change without notice. No part of this document
may be reproduced or transmitted in any form or by any means, electronic or mechanical,
for any purpose without the express written permission of Tricentis GmbH.
© 2021 by Tricentis GmbH

Tricentis GmbH, Leonard-Bernstein-Straße 10,


1220 Vienna,Austria
Learn along with Experts
3. Assignments

Objective Implement the hands-on use cases to learn various tips and tricks of Tosca
automation.
To do - Test Table:
Steps
Difference between # and $:
1. Login to Demo Webshop Application -
http://demowebshop.tricentis.com/
2. Perform the following steps manually
3. Navigate to the Accessories page
COMPUTERS→Accessories
4. Add all the listed products to the shopping cart except TCP Coaching
Day product
5. Navigate to Digital Download Page
6. Add products titled Music 2 to the shopping cart
7. Navigate to Shopping cart Page
8. Ensure that your Shopping cart table has all the products as shown in
the image below

9. Create a new TestCase and name it as Table steering


10. Drag and drop Shopping Cart module to the TestCase from this path
Modules→Webshop→Shopping Cart
11. Rename the TestStep to Understand the difference between $ and #
12. Specify values for the table attributes as per the following table

Tricentis GmbH, Leonard-Bernstein-Straße 10,


1220 Vienna,Austria
Learn along with Experts

13. Execute the TestStep in the Scratchbook and observe results


Result – Tosca will create the buffer Product with the value “TCP
Instructor Led Training “
14. Update values for the table attributes as per the following table

15. Execute the TestStep in the Scratchbook and observe results


Result – Tosca will update the buffer Product value as "Product(s) "

Check occurrence using Constraint:

1. Drag and drop Shopping Cart module again to the TestCase


2. Rename the TestStep to Dealing with Specific occurrence of the cell
value
3. Specify values for the table attributes as per the following table

4. Execute the TestStep in the Scratchbook and observe results


Result – Tosca will store the price of the second Music 2 product in the
buffer Price. The value stored is "Price:3.00" (i.e., of the 2nd Music product
in the list)

Baseline comparison:

1. Create a new test case and name it as Baseline comparison


2. Drag and drop Shopping Cart module again to this TestCase
3. Navigate to the Shopping cart products test step value and click on
Create Baseline option from the test case menu
4. Once the baseline is created, execute the test case
5. Expand the Shopping cart products test step value and replace
<Row> with $1 and select the action mode – Exclude
6. Execute the test case, this time first content row would be excluded
from the comparison

Tricentis GmbH, Leonard-Bernstein-Straße 10,


1220 Vienna,Austria
Learn along with Experts
Date manipulation:

1. Create a new test case “Date Manipulation” and add a new test step using
the standard module, “Tbox set buffer”
2. Create a buffer SourceDate and in the value section add 03/21/2021
3. Create a new buffer in the same test step with buffer name TargetDate
and value {DATE[{B[SourceDate]}][+1d+1M+1y][dd-MM-yyyy]}
4. Create a new Test Configuration Parameter on this test case –
ToscaDateFormat and keep its value MM/dd/yyyy

Click and mouse operations:

1. Open
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_button_te
st
2. Scan the Click Me button and save the module as Click Me button.
3. Navigate to the test case folder and create a new test case named Click
operations
4. Drag and drop the scanned “Click me button” module on this test case
thrice
5. In the test step value enter below values
a. {MOUSE[RIGHTCLICK][HorizontalFirst][10%][10%]}
b. {LONGCLICK}
c. {MOUSEOVER}

Note: By default, the click operation happens at 50% horizontal and


50% vertical.

Challenge: Complete the below drag and drop based obstacle


https://obstaclecourse.tricentis.com/Obstacles/23292

Data manipulation:

1. Open - https://obstaclecourse.tricentis.com/Obstacles/45618
2. Scan the Click me to reveal button and the three text boxes
3. Update the Cardinality of Click me to reveal! To 0-N
4. Drag and drop the module in a test case and enter the test step values as
below:
Click me to reveal! – {Click}
Click me to reveal! – {REGEX["^.*?(?<firstNo>[0-
9]+).*?(?<secondNo>[0-9]+).*?(?<thirdNo>[0-9]+).*?$"]} | Action
mode - Verify

Enter first number here! - {B[firstNo]}


Enter second number here! - {B[secondNo]}
Enter third number here! - {B[thirdNo]}

Tricentis GmbH, Leonard-Bernstein-Straße 10,


1220 Vienna,Austria

You might also like