Experience & exploration about software QA tools & techniques. Maintaining & writing blog posts on qavalidation.com! Publishing video tutorials on youtube.com/qavbox
This post will explain the integration of any java logger (let’s say Log4j) with ITestListener to customise result output and print the same to log file. We have seen testNG and it’s listener ITestListener to customise the result output. Watch details here Log4j maven dependency Use below dependency – <!– https://mvnrepository.com/artifact/log4j/log4j –> <dependency> <groupId>log4j</groupId>…
TestNG provides many listeners (as interfaces) which you can customise to your need to get output more readable. Here are the listeners – IAnnotationTransformer IAnnotationTransformer2 IHookable IInvokedMethodListener IMethodInterceptor IReporter ISuiteListener ITestListener Source – TestNG Listeners From this above listeners, in this post we will see ITestListener ITestListener interface has the following methods to implement void…
In this post, we will discuss how to setup android & ios simulators, write and run appium java tests using Java. Setup android – Download Android device manager to manage android simulators – Follow here or you can use genymotion android simulator, refer here To get App package and app activity – Use APKInfo.apk Download…
Every moment an automation engineer think to make the framework more flexible, using an external source file as test data is one step towards making your framework more flexible, so that you can change your test data any time without changing your script. Problem If you do not maintain an external source file for test…
So far we have seen how to identify a webelement and perform actions on different webelements using protractor. In this post, we will see how to implement page object model or POM in protractor. Advantages Better readability, maintainable Easy to update framework thus lead to easy to understand. Watch how to do – Code repository…
In this post, we will come to know – How to identify tables or ng-repeater elements. Identify rows and columns Based on search data, perform actions such as add, edit or delete. Watch demo here Code implementation – import { browser, element, by, protractor } from “protractor”; import { log4jsconfig } from ‘../config/log4jsconfig’ import {alert}…
In this post, we will come to know – How to identify dropdown elements and different ways to select an option from the dropdown Identify button using the display text Handle alerts, get the alert text and verify the content and click on the ok button to accept the alert. Watch demo here Code implementation…
In this post, we will come to know – Enter text into a textbox Clicking on a button Handle alerts, get the alert text and verify the content and click on the ok button to accept the alert. Watch the demo here Code implementation – import { browser, element, by, protractor } from “protractor”; import…
Protractor Console output As protractor is built on top of webdriver JS, we should resolve promise while printing to console output. so below statement doesn’t work console.log(“Browser title :- ” + browser.gettitle()); instead, you can use browser.getTitle().then(function(txt){ console.log(“Browser Title :- ” + txt); }); watch details here Protractor log to file As protractor is a…