Webdriver io - Part 1
I have been using webdriverio to run selenium ui tests. When I joined the project, i found the code in the following format. I will provide a brief overview of the improvements I did, to make the code more readable and maintenable. It could help people who are joining projects with existing code bases and need to continue working on them. The sample code provided below has been changed so that it is anonymous, but is still useful for instruction purpose. describe('Loan Application UI', function () { var infoTextElement, YellowBtnElement, RedBtnElement, contactElement, landingPageTextElement, RedSignInBtnElement; infoTextElement = 'h3'; RedBtnElement = 'button:nth-child(3)'; YellowBtnElement = 'button:nth-child(2)'; landingPageTextElement = 'h2'; RedSignInBtnElement = '#LoanApplicationSelected>div>button'; contactElement = '#BizDetails ...