Skip to main content

Posts

Showing posts with the label Javascript

WebdriverIO Introduction in PHPStorm

Hi folks, Trying various frameworks is fun and interesting and will ultimately lead to improve yourself as a Test Automation Engineer by enabling you to have a better idea regarding the available options when it comes to frameworks. This will in fact help you to choose the ideal automation framework for your corporate project as a Test Automation Engineer. Few days back, I had the opportunity to automate a React app using WebdriverIO. Let's have a look at it !! Setting up WebdriverIO project on PHPStorm Pre-requisites - Create React app package has to be installed, it simply sets up the tools you need to start your React project on PhpStorm. npm install - g create - react - app - Node.js has to be installed, Refer the link 1. Create a new project -> React App 2. WebdriverIO client has to be installed npm i --save-dev @wdio /cli 3. Next, we have to generate a configuration file that stores all of our WebdriverIO settings. To do that just run the configuration ...

Protractor Page Object Model

Hi All, I would like to share my learning regarding Protractor Page Object Model (POM). Protractor is an end to end test framework used to automate Angular web applications. In POM, for each web page there should be corresponding page class. Carrying out the task of "Finding the web elements and methods" will be done from the page class. This of course improves the maintainability and reusability of the code. Here I will show a simple example without Page Object Model which I have written in Javascript using Protractor framework. describe ( ' Angular home page ' , function ( ) { it ( ' should add the String in todo list ' , function ( ) { browser . get ( ' https://angularjs.org/ ' ) ; element . all ( by . css ( " [placeholder='add new todo here'] " ) ) . sendKeys ( " Add POM " ) ; element ( by . css ( ' input.btn-primary ' ) ) . click ( ) ; var getText = eleme...