December 2, 2021

Selenium Interview Questions on Textbox Part -2

December 02, 2021 19
Selenium Interview Questions on Textbox Part -2
Selenium Interview Questions on Textbox1. How to get text in textbox?2. How to get attributes like size, placeholder of text box?We have to use getAttribute command to get attrubte values of textbox.driver.findElement(locator).getAttribute("value"); -- for text in textbox driver.findElement(locator).getAttribute("attributeName"); -- For any attrib...

December 1, 2021

Selenium Interview Questions on Textbox Part -1

December 01, 2021 1
Selenium Interview Questions on Textbox Part -1
Selenium Interview Questions on Textbox1. How to type into a text box using selenium webdriver?We have different ways to type text into textbox/textfield or text area1. Using sendkeys - driver.findElement(locator).sendKeys("text");2. Using JavascriptExecutor document.getElementById JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("document.getElementById('id').setAttribute('value','text')");3. Using JavascriptExecutor arguments[0].value jse.executeScript("arguments[0].value='enter...

January 11, 2020

Execute scripts on Edge Browser

January 11, 2020 2
Execute scripts on Edge Browser
In this post we will see how to execute webdriver scripts in EDGE Browser. For other browsers like google chrome and firefox we need to download corresponding exe files and need to set system path. If you are using latest version of edge i.e 18+ then the set up is little bit different. Check Edge Version :  Launch edge browser Right hand top corner you see 3 dots. Click on 3 dots and click on Settings At the end you can see browser information. Mine...

October 2, 2018

Automatic download and management of Selenium WebDriver binaries (Driver.exe files)

October 02, 2018 9
Automatic download and management of Selenium WebDriver binaries (Driver.exe files)
In this post we will see how to avoid downloading driver.exe file and setpath for browser binary. As you guys already know in order to use chrome, firefox or edge browsers, first we need to download a binary file (driver.exe) and need to set path which allows Webdriver to handle browsers. Below is example how to set path: By adding a small dependency in your POM.xml (Assuming you are using maven project) we can avoid downloading binary files and set...

January 18, 2017

Git Installation

January 18, 2017 61
Git Installation
Git : Git is a version control system (VCS) for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for software development,but it can be used to keep track of changes in any files. As a distributed revision control system it is aimed at speed,data integrity and support for distributed, non-linear workflows Steps to Install Git: Download Latest Git installer  Git For Windows. While...

Git and GitHub

January 18, 2017 9
Git and GitHub
In this article I will discuss about Git and GitHub. First question comes in everybody's mind, what is Git and what is GitHub. Both are same or different? GIT: Below is the definition from GIT official site.  (https://git-scm.com/) Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency Git is a distributed version control system. There...

July 12, 2016

Perfect Example for Handling Window,popup,Frame and Alerts

July 12, 2016 8
Perfect Example for Handling Window,popup,Frame and Alerts
In this post i will explain about how to handle Multiple windows Popups Tabs Frames Alerts and how to write customized functions, instead of duplicating the webdriver code. Here is one example to switchToChildWindow() This method is useful to switch to new window/tab/popup if you have only 2 windows/tabs/popup then you can use below customized function. In the below example i wrote different functions   isElepresent(By locator) -- Verify...

June 13, 2016

Handling OnChange events using Selenium webdriver and Java script

June 13, 2016 73
Handling OnChange events using Selenium webdriver and Java script
In this post I will discuss about onchange events. What is onchange event? The onchange event occurs when the value of an element has been changed. For radiobuttons and checkboxes, the onchange event occurs when the checked state has been changed. onChange specifies script code to run when the data in the input field changes. The onChange event is triggered when the contents of the field changes. In this example if you type some thing...

March 3, 2016

Advanced Xpath with Examples

March 03, 2016 64
Advanced Xpath with Examples
Here i am going to discuss about advanced usage of xpaths.. I will provide examples how to use xpath Axes. Descendants A node's children, children's children, etc. In the following example; descendants of the form element are the div, title, author, year, and price elements <form> <div>   <title>Harry Potter</title>   <author>J K. Rowling</author>   <year>2005</year>   <price>29.99</price> </div> </form> Here...
Page 1 of 2012320Next