Experience & exploration about software QA tools & techniques. Maintaining & writing blog posts on qavalidation.com! Publishing video tutorials on youtube.com/qavbox
In this post we will understand how we can read/write excel sheet and styles using ExcelJS [javaScript/TypeScript]. We are using node.js / npm package “ExcelJS” to achieve excel operations. Installation : Open terminal [Ctrl + `] and enter npm install exceljs or make an entry to the package.json under dependency and run command npm install…
From selenium 3.0 beta 4, selenium introduced class FirefoxOptions to Manage firefox specific settings in a way gecko driver can understand. Let’s see how firefox settings we can use in selenium easily Before to selenium 3.0, used firefox profile as FirefoxProfile profile= new FirefoxProfile(); profile.setPreference(“browser.startup.homepage”,”http://qavalidation.com”); profile.setAcceptUntrustedCertificates(true); DesiredCapabilities caps=DesiredCapabilities.firefox(); caps.setCapability(FirefoxDriver.PROFILE, profile); FirefoxDriver driver = new FirefoxDriver(caps); Now we can…
This below chart will let you know which version of selenium is compatible with which version of browsers / drivers. Selenium version Browser version Driver Compatibility? 2.53.0 Chrome NA Yes 2.53.0 FF <= 47.0.1 NA Yes 3.0.0 FF > 47.0.1 0.15 Yes 3.4.0 FF – 48 0.16 Yes 3.7.0 FF – 56 0.19.1 Yes 3.7.0…
In one of our post Protractor test on chrome browser, we have seen how to run protractor tests in chrome browser (using VSCode IDE), in this post we will be using WebStorm IDE [just to get a difference experience] to run protractor tests on firefox browser Let’s see the implementation step by step Download and…
myStr.getChars(srcBeginIndex, srcEndIndex, dstCharArray, dstBeginIndex) is a java method which helps to get a part of the string into character array, this method accepts 4 parametes, This method doesn’t return any value, rather it copies the part of the string in to the character array specified in the third parameter. let’s see the implementation public static…
Problem – In one of my earlier post Selenium java for angularJS apps, we have seen how we can use selenium webdriver and java to test angular js controls, but there are few limitations like we need to stick to a particular locator strategy (xpath or css) as selenium itself do not have locators…
We have seen how to get a particular character from a string by providing the index, the same manner if we want to know the index of a character [or position] with in a string, java provides a method .indexOf(char c), let’s see the implementation public static void main(String[] args) { String myStr = new…
If you want to display or get any one character from a string, java provides a method .charAt(index) [this returns a character from the specified index], let’s see the implementation index should be with in the string length range, else will get exception java.lang.StringIndexOutOfBoundsException public static void main(String[] args) { String myStr = new String(“Welcome”);…
If you want to convert a string into character array, java provides a method .toCharArray() [this returns a character array], let’s see the implementation public class CharString { public static void main(String[] args) { String myStr = new String(“Welcome”); char[] chars; System.out.println(“Individual characters – “); chars = myStr.toCharArray(); for(int i=0 ; i < chars.length ;…