Debomita Bhattacharjee has Published 863 Articles

How to select checkboxes using selenium java webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 12:29:06

2K+ Views

We can select the checkbox with Selenium. In an html document, each checkbox has an attribute type set to a value as checkbox. In order to select a checkbox, we shall first identify a checkbox with any locator and then apply the click() method to it.ExampleCode Implementation.import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; ... Read More

How to switch to new window in Selenium for Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 12:26:55

1K+ Views

Selenium can switch to new windows when there are multiple windows opened. There may be scenarios when filling a date field in a form opens to a new window or clicking a link, button or an advertisement opens a new tab.Selenium uses the current_window_handle and window_handles methods to work with ... Read More

How to create right click using selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 12:24:56

2K+ Views

The right click is performed on any element on the web page to display its context menu. For example, if we right click on an edit box, a new menu with multiple options gets displayed.Selenium uses the Actions class to perform the right click action. The contextClick() is a method ... Read More

How to get screenshot of full webpage using Selenium and Java?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 12:22:43

784 Views

Whenever we encounter a failure during testing, it is a common nature to capture the screenshots wherever there is a deviation from the expected result. Thus it is considered a mandatory step to attach a screenshot for creating a bug.While automating a bunch of test cases of a considerable number, ... Read More

Fetch all href link using selenium in python.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 12:20:29

22K+ Views

We can fetch href links in a page in Selenium by using the method find_elements(). All the links in the webpage are designed in a html document such that they are enclosed within the anchor tag.To fetch all the elements having tagname, we shall use the method find_elements_by_tag_name(). It ... Read More

Selenium Webdriver submit() vs click().

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 06:36:08

11K+ Views

The click() and submit() functions are quite similar in terms of functionalities. However there are minor differences. Let us discuss some differences between them.The submit() function is applicable only for and makes handling of form easier. It can be used with any element inside a form. The click() is ... Read More

Fill username and password using selenium in python.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 06:32:40

3K+ Views

We can fill username and password fields in a login page with Selenium. This is considered an authentication step for any application. Once the username and password is entered, we have to click the login button.ExampleCode Implementation.import time from selenium import webdriver driver = webdriver.Chrome (executable_path="C:\chromedriver.exe") driver.get("https://mail.rediff.com/cgi-bin/login.cgi") # identify username, ... Read More

Test if element is present using Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 06:31:00

4K+ Views

We can verify if an element is present using Selenium. This can be determined with the help of findElements() method. It returns the list of elements matching the locator we passed as an argument to that method.In case there is no matching element, an empty list [having size = 0] ... Read More

How to take partial screenshot (frame) with Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 06:27:47

639 Views

Whenever we encounter a failure during testing, it is a common nature to capture the screenshots wherever there is a deviation from the expected result. Thus it is considered a mandatory step to attach a screenshot for creating a bug.While automating a bunch of test cases of a considerable number, ... Read More

How to automate drag & drop functionality using Selenium WebDriver Java?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Aug-2020 06:25:06

686 Views

The drag and drop action is done with the help of a mouse. It happens when we drag and then place an element from one place to another. This is a common scenario when we try to move a file from one folder to another by simply drag and drop ... Read More

Advertisements