<<Complete Vitaq AI Tutorial>> Next Post>>
Visual Scripting with Vitaq AI Test Automation Tool
In this next article of the Vitaq AI Test Automation Tutorial Series, I will demonstrate how we can use the power of Visual Programming in Scriptworks through Vitaq AI to achieve our Test Automation Goals.
For non-coders, the most productive way to work with Vitaq through Selenium and Appium for web and mobile app testing is to use the power of Visual Programming in Scriptworks. This includes a very powerful AI-enabled smart selector strategy to help remove the pain of brittle selectors. Scriptworks also has a very helpful ‘selector inspector’ tool, to identify the robust selector strategies and also check that they work effectively.
Let’s find it out how Scriptworks visual coding works with Vitaq AI:-
1) Navigate to https://www.scriptworks.io/ and Login to your scriptworks cloud account with your scriptworks username and password.
2) On the Home page of Scriptworks click on New Project.
4) Click on New Test and complete the Test Info and Click on Save Button.
5) Now open the Vitaq AI Test Automation Tool.
6) Click on Edit, select Preferences, and click on it.
7) Check Use Scriptworks Integration checkbox, Enter Username and Password and click on Connect to establish a connection between Vitaq AI and Scriptworks cloud, now Click on Scriptworks Project Load button to select your Project name which we have given in Step 3. And Then Click on Scriptworks Run Settings Load Button to select the desired Browser Settings.
8) Now In Edit Preferences Box Check Use Coverage Checkbox. Make sure Database Information is present. Now Check Use AI Checkbox as well and click on Ok Button.
9) Click on File and Select New and Click on it.
10) Enter the name of the new test activity file, for example, I am giving it as the name of “SwagLabsScriptworks” same as I have given in scriptworks to maintain consistency across Vitaq AI and Scriptworks for better understanding.
11) Now Click on New Action and Create a Test Action Let’s say “Login” and likewise create all your required Test Actions as per the shopping app under test needs. Once you connect your test action to the next allowable test action to complete all of your user stories, you will have completed your beautiful Test Activity Diagram. This visual model of your test space provides a powerful springboard to now complete the details of your individual test action scripts (the programming part of testing).
12) Now to create the Test Action functions in Scriptworks (which will have the same name as your test actions to map the visual code to your Test Activity diagram). Click on Edit and Select Create Scriptworks Functions and click on it. It will generate the same name functions in scriptworks of each and every test action of the Vitaq AI Test Activity Diagram.
13) We will be running a short User Journey for learning purposes. Looking at that we can create the remaining user journeys with ease.
‘Login --> products --> clickOnBackPack --> clickOnAddToCart Then clickOnShoppingCart -->clickOnContinueShopping’
14) Let’s take a look at how we can make visual coding our Vitaq test actions in Scriptworks. We’ll show you how we do it for the ‘Login’ action.
To make Login Function (which is a test action in Vitaq AI) test code in scriptworks visual coding, we need to think about what elements are actually required to login to an application.
Elements required are:-
- Login Button
Let’s find the locators of the above-mentioned elements through the ‘Selector Inspector Tool’ inside scriptworks. And then use them in Login Function to complete Login Functionality.
i) Click on the element inspector icon available on the left panel.