Debomita Bhattacharjee has Published 863 Articles

How to find a radio button element by value using Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 13:37:46

3K+ Views

We can find a radio button element by value with Selenium webdriver. A radio button in an html document has a tagname input and it has a type attribute set to radio. We can select a radio button by using the click() method after identifying it.Let us see the html ... Read More

Get page title with Selenium WebDriver using Java.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 13:29:47

18K+ Views

We can get the page title with Selenium webdriver. The method getTitle() is used to obtain the present page title and then we can get the result in the console.Syntaxt = driver.getTitle();Let us find the title of the current page. We shall get About Careers at Tutorials Point – Tutorialspoint ... Read More

How to get selected option using Selenium WebDriver with Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 13:25:05

5K+ Views

We can obtain the option selected in a dropdown with Selenium webdriver. The first_selected_option method fetches the option selected in the dropdown. Once the option is returned we need to apply a text method to get option text.Let us consider the select dropdown Continents and fetch its selected item −Examplefrom ... Read More

How to use select list in selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 13:19:12

3K+ Views

We can select an option from the dropdown list with Selenium webdriver. The Select class is used to handle static dropdown. A dropdown is identified with the tag in an html code.Let us consider the below html code for tag.We have to import org.openqa.selenium.support.ui.Select to work with methods ... Read More

How to simulate HTML5 Drag and Drop in Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 12:47:03

612 Views

We can simulate HTML5 drag and drop with Selenium webdriver. This is a feature that gets implemented if an element is dragged from its position and dropped on another element in another position.Actions class in Selenium is used for taking care of this functionality. The drag_and_drop(source, target) is the available ... Read More

Is there a way to find an element by attributes in Python Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 12:20:32

4K+ Views

We can find an element by attributes with Selenium webdriver. There are multiple ways to do this. We can use the locators like css and xpath that use attributes and its value to identify an element.For css selector, theexpression to be used is tagname[attribute='value']. There are two types of xpath ... Read More

How to use Selenium webdriver to click google search?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 12:06:55

16K+ Views

We can click on Google search with Selenium webdriver. First of all we need to identify the search edit box with help of any of the locators like id, class, name, xpath or css.Then we will input some text with the sendKeys() method. Next we have to identify the search ... Read More

What does WebElement clear() Do to TextBoxes?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 12:02:29

2K+ Views

We can erase the contents from text boxes with Selenium webdriver. This is done with the clear() method. This method clears the edit box and also makes the field enabled.First of all we need to identify the element with help of any of the locators like id, class, name, xpath ... Read More

How to get text from Selenium element WebElement object?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 11:58:38

8K+ Views

We can get text from a webelement with Selenium webdriver. The getText() methods obtains the innerText of an element. It fetches the text of an element which is visible along with its sub elements. It ignores the trailing and leading spaces.First of all we need to identify the element with ... Read More

How to use selenium to check if element contains specific class attribute?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 11:49:28

6K+ Views

We can check if an element contains a specific class attribute value. The getAttribute() method is used to get the value of the class attribute. We need to pass class as a parameter to the getAttribute() method.First of all we need to identify the element with help of any of ... Read More

Advertisements