Debomita Bhattacharjee has Published 863 Articles

How to find parent elements by python webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 09:14:14

7K+ Views

We can find parent elements with Selenium webdriver. First of all we need to identify the child element with help of any of the locators like id, class, name, xpath or css. Then we have to identify the parent element with the find_element_by_xpath() method.We can identify the parent from the ... Read More

How can I get the current contents of an element in webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 09:09:28

449 Views

We can get the current contents of an element in Selenium webdriver. For the elements having tagname as we have to use the getAttribute() method and pass the value parameter as an argument to that method to obtain the current contents.For the elements without an input tag we have ... Read More

How to check if an element is visible with WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 09:03:11

8K+ Views

We can check if an element exists with Selenium webdriver. There are multiple ways to check it. We shall use the explicit wait concept in synchronization to verify the visibility of an element.Let us consider the below webelement and check if it is visible on the page. There is a ... Read More

Checking if element exists with Python Selenium.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 08:56:35

13K+ Views

We can check if an element exists with Selenium webdriver. There are multiple ways to achieve this. We can introduce a try / except block. In the except block, we shall throw the NoSuchElementException in case the element does not exist on the page.We can also verify if an element ... Read More

How to check if an alert exists using WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 08:43:21

8K+ Views

We can check if an alert exists with Selenium webdriver. An alert is created with the help of Javascript. We shall use the explicit wait concept in synchronization to verify the presence of an alert.Let us consider the below alert and check its presence on the page. There is a ... Read More

How to select a drop-down menu option value with Selenium (Python)?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 08:38:01

17K+ Views

We can select a drop-down menu option value with Selenium webdriver. The Select class in Selenium is used to handle drop-down. In an html document, the drop-down is identified with the tag.Let us see the html structure of a drop-down.For using the methods of Select class we have to ... Read More

How to get text from each cell of an HTML table using Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 08:30:23

6K+ Views

We can get text from each cell of an HTML table with Selenium webdriver.A tag is used to define a table in an html document. A table consists of rows represented by and columns represented by . The table headers are identified by tag.Let us consider a ... Read More

How to get entered text from a textbox in selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 08:06:50

19K+ Views

We can get the entered text from a textbox in Selenium webdriver. To obtain the value attribute of an element in the html document, we have to use the getAttribute() method. Then the value is passed as a parameter to the method.Let us consider a textbox where we entered some text ... Read More

Select iframe using Python and Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 08:00:45

5K+ Views

We can select iframe with Selenium webdriver. An iframe is identified with a tag in an html document. An iframe is an html document containing elements which resides inside another html document.Let us see a html document of a frame.The following methods help to switch between iframes−switch_to.frame(args) – The ... Read More

How to select element using XPATH syntax on Selenium for Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 18-Sep-2020 07:54:10

1K+ Views

We can select elements using xpath with Selenium webdriver. Xpath is one of the most important locators. There are two types of xpath. They are known as absolute [starting from parent node in DOM] and relative xpath [starting from anywhere in DOM].The xpath syntax is − //tagname[@attribute='value'] or //*[@attribute='value'].Let us ... Read More

Advertisements