Debomita Bhattacharjee has Published 863 Articles

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

Debomita Bhattacharjee

Debomita Bhattacharjee

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

2K+ Views

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

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

1K+ Views

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 ().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

4K+ Views

We can get the values of a particular row in a table in Selenium. The rows of a table are represented by tag in html code. The data in each row is enclosed with the tag in html. Thus a tag’s parent is always a tag.The ... 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

12K+ Views

We can count the total number of rows in a table in Selenium. The rows of a table are represented by 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

4K+ Views

We can extract the column headers in a table in Selenium. The headers of a table are represented by tag in html and always in the first row of the table. The rows are identified with tag in html. A tag’s parent is always a 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

2K+ Views

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

2K+ Views

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

1K+ Views

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

What are the differences between switch_to_default_content() and switch_to.parent_frame() methods in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 09:42:26

3K+ Views

There are differences between switch_to.parent_frame() and switch_to_default_content() in frames. They are listed below −switch_to_parent_frame()This method is used to come out of the present frame, then we can access the elements outside that frame and not inside of that frame. Thus the control is switched; the outer part may be another ... Read More

How to work with cookies in Selenium with python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 29-Jul-2020 09:39:16

762 Views

We can work with cookies in Selenium with the help of numerous methods which control the browser or its sessions. We can easily add or delete a cookie. A cookie implementation is essential for ensuring proper authentication of websites.The methods to work with cookie are listed below −add_cookie(args)This method adds ... Read More

Advertisements