Member-only story
Programming for Automation through Eg. Pick up a language then learning the ins and outs of a tool.
To outshine in test automation profession trusting on education a single testing tool is not the recommended tactic. Irrespective of the tool you must acquire how to code. Pick up a programming language then learning the ins and outs of an automation tool can give the advantage. In this post compares two scripts that are for performing the same action using the same libraries. The screenshot captured below depicts the functionality. Robot Framework is the tool used for the example but similar features are available regardless of the tool.
Script 1 :
***Settings***
Library String
Library SeleniumLibrary
Library Collections
Robot Framework testing capabilities are extending for this script using String, SeleniumLibrary and Collections library.
***Variables***
${PIN_LOCATOR1} id=PageConfiguration.PIN1
${PIN_LOCATOR2} id=PageConfiguration.PIN2
${PIN_LOCATOR3} id=PageConfiguration.PIN3
${PIN_LOCATOR4} id=PageConfiguration.PIN4
${CONFIRM_PIN_LOCATOR1} id=PageConfiguration.CONFIRM_PIN1
${CONFIRM_PIN_LOCATOR2} id=PageConfiguration.CONFIRM_PIN2
${CONFIRM_PIN_LOCATOR3} id=PageConfiguration.CONFIRM_PIN3
${CONFIRM_PIN_LOCATOR4} id=PageConfiguration.CONFIRM_PIN4
@{PIN_NUMBER} null