Posts

Showing posts with the label Selenium Webdriver

Mastering User Interactions with the Actions Class in Selenium WebDriver

Image
1. Introduction Selenium WebDriver is a widely used framework for automating web browser interactions. In this tutorial, we will cover the initial setup required to start using Selenium WebDriver, creating instances of the Actions class, and performing various mouse actions using Selenium. Let's dive in! Table of Contents Introduction 1.1. What is Actions Class? 1.2. Benefits of Using Actions Class

What is Robot Class in Selenium WebDriver?

Image
Selenium can't interact with Window dialogs on it's own. You all must know that Selenium can only handle browser windows and not OS windows. So, when we have to upload any file on a webpage and as soon as we click on the Browse or Upload button, a windows tab opens up from which we have to select the file. We cannot handle that windows tab directly with Selenium WebDriver. But we can use other libraries and integrate them with Selenium code to handle window based dialogs. Robot class is one of them. We can use Robot class to upload or download a file using selenium. What is Robot Class in Selenium WebDriver? Robot Class is used to perform Keyboard actions. It has direct support to perform actions like press and release key. Robot class has key codes for each key present on the keyboard. So, if we want to press any key, then we need to call that key code. In automation we make use of Robot class to handle Windows tabs by interacting with them via virtual keyboard. One i

Mastering Selenium Practice: Automating Web Tables with Demo Examples

Image
Demo Webtable 1 (Static Table) This table has 7 rows and 3 columns. So, the distribution of rows and columns is even. We can assume this table is a static or linear table. This table is easy to automate.  Company Contact Country Google Maria Anders Germany Meta Francisco Chang Mexico Microsoft Roland Mendel Austria Island Trading Helen Bennett UK Adobe Yoshi Tannamuri Canada Amazon Giovanni Rovelli Italy Demo Webtable 2 (Dynamic Table) This table has an uneven distribution of rows and columns the last row has two columns only, but the other rows have 7 columns each. So, let's assume it is a dynamic table. This table is a tougher task. Structure Country City Height Built Rank … Total 4 buildings Burj Khalifa UAE Dubai 829m 2010 1 Clock Tower Hotel Saudi Arabia Mecca 601m 2012 2 Taipei 101 Taiwan Taipei 509m 2004 3 Financial Center China Shanghai 492m 2008 4 Selenium Practice Exercises for Demo Table 2 -  Verify that there are only 4 structure values present in the table with Seleniu