Debomita Bhattacharjee has Published 897 Answers

How to perform drag and drop operation in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:32:10

We can perform drag and drop actions in Selenium with the help of Action Chains class. These classes are generally used for automating interactions like context menu click, mouse button actions, key press and mouse movements.These types of actions are mainly common in complex scenarios like drag and drop and ... Read More

What are ActionChains class in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:31:17

We have the concept of ActionChains class in Selenium. These classes are generally used for automating interactions like context menu click, mouse button actions, key press and mouse movements.These types of actions are mainly common in complex scenarios like drag and drop and hovering over an element on the page. ... Read More

How to count the total number of tables in a page in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:30:53

We can count the total number of tables in a page in Selenium with the help of find_elements method. While working on any tables, we will always find the tagname in the html code and its value should be table (<table>).This characteristic is only applicable to tables on that particular ... Read More

How to get the values of a particular row in a table in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:28:59

We can get the values of a particular row in a table in Selenium. The rows of a table are represented by <tr> tag in html code. The data in each row is enclosed with the <td> tag in html. Thus a <td> tag’s parent is always a <tr> tag.The ... Read More

How to count the number of columns in a table in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:23:39

We can count the number of columns in a table in Selenium. The headers of a table are represented by <th> tag in html and always in the first row of the table. The rows are identified with <tr> tag in html. The total count of the number of column ... Read More

How to count the number of rows in a table in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:21:15

We can count the total number of rows in a table in Selenium. The rows of a table are represented by <tr> tag in html code. To get all the rows, we shall use the locator xpath and then use find_elements_by_xpath method. The list of rows will be returned. Next ... Read More

How to extract the column headers in a table in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 10:20:05

We can extract the column headers in a table in Selenium. The headers of a table are represented by <th> tag in html and always in the first row of the table. The rows are identified with <tr> tag in html. A <th> tag’s parent is always a <tr> tag.The ... Read More

How to key in values in input text box with Javascript executor in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 09:47:10

We can key in values inside an input text box with a Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript.SyntaxjavaScript = "document.getElementsByClassName('gsc-input')[0].value = 'T' ") driver.execute_script(javaScript)There are couple of methods ... Read More

How to click on a link with a Javascript executor in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 09:45:24

We can perform click operation on links with Javascript executors in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript.SyntaxjavaScript = "document.getElementsByClassName('tp-logo')[0].click();" driver.execute_script(javaScript)There are couple of methods by which Javascript can be executed within ... Read More

What are the differences between current_window_handle and window_handles methods in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 09:43:57

There are differences between current_window_handle and window_handles methods in Selenium. Both are methods to handle multiple windows. They differences are listed below −current_window_handleThis method fetches the handle of the present window. Thus it deals with the window in focus at the moment. It returns the window handle id as a ... Read More

Advertisements