Debomita Bhattacharjee has Published 863 Articles

When do we use findElement() and findElements() in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:25:44

5K+ Views

The methods findElements and findElement are used to identify elements on a webpage. While findElement can pinpoint only one element, the findElements method yields a list of matching web elements.The return type of findElements is a list whereas the return type of findElement is a WebElement. If there is no ... Read More

How to run Selenium tests on Chrome Browser using?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:21:48

720 Views

We can run Selenium tests on Chrome browser with the help of the chromedriver.exe executable file. First, we have to download the chromedriver.exe file from the following link − https://sites.google.com/a/chromium.org/chromedriver/downloadsWe have to click on the link which matches with the Chrome browser in our system. Next, choose the link based ... Read More

How to scroll a Web Page using coordinates of a WebElement in Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:58:44

3K+ Views

We can scroll a webpage using coordinates of a webelement in Selenium webdriver using the JavaScript Executor. Selenium executes JavaScript commands with the help of the executeScript method.To get the unique coordinates of an element we shall create an object of the class Point which shall store the location of ... Read More

How to Verify Tooltip using Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:57:39

2K+ Views

We can verify the tooltip of an element using Selenium webdriver using the getAttribute method. A tooltip text is the one which gets displayed while we hover on that element.It disappears once we move the mouse away from the element. A tooltip text generally displays the title attribute value of ... Read More

What are the different ways to select an option from a dropdown using Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:56:59

992 Views

We have different ways to select an option from a dropdown using Selenium webdriver. This is done with the help of the Select class. A dropdown in the html code is represented by select tag.The options in a dropdown are represented by the option tag. Also, we have to add ... Read More

How to close active/current tab without closing the browser in Selenium-Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:54:06

16K+ Views

We can close the active/current tab without closing the browser in Selenium webdriver in Python. By default, Selenium has control over the parent window. Once another browser window is opened, we have to explicitly shift the control with the help of switch_to.window method.The handle id of the browser window where ... Read More

What are the pre-conditions for Selenium Internet Explorer Driver or IE Driver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:53:45

272 Views

There are pre-conditions to be configured before we can kick off execution in Selenium webdriver. First we have to check the Protection Mode of our IE browser.Launch Internet Explorer → move to Tools Menu → Internet Options.Then go to the Security tab. Check the option Select Enable Protected Mode. Also, ... Read More

How to configure IE Driver via System Properties in Environment Variables?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:48:51

416 Views

We can configure IE Driver via System Properties in Environment variables. Firstly, we have to navigate to the link − https://www.selenium.dev/downloads/. Then click on the download link (32 or 64 it) based on the operating system available with us.Once the download is done, a zip file gets created. It needs ... Read More

How to find an element using the “CSS Selector” in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:44:38

6K+ Views

We can find an element using the css locator with Selenium webdriver. To identify the element with css, the expression should be tagname[attribute='value'].We can also specifically use the id attribute to create a css expression.With id, the format of a css expression should be tagname#. For example, input#txt [here input ... Read More

How to find an element using the “XPath” in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 08:44:11

7K+ Views

We can find an element using the xpath locator with Selenium webdriver.To identify the element with xpath, the expression should be //tagname[@attribute='value'].To identify the element with xpath, the expression should be //tagname[@class='value']. There can be two types of xpath – relative and absolute. The absolute xpath begins with / symbol ... Read More

Advertisements