Debomita Bhattacharjee has Published 863 Articles

How to select/get drop down option in Selenium 2?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:15:15

885 Views

We can select the dropdown option in Selenium webdriver. The dropdowns can be worked upon with the help of the Select class. The select tag is used to represent a dropdown and option tag is used to represent items in the dropdown in html.Let us investigate the html structure of ... Read More

How to Resolve Stale Element Reference Exception in Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:14:27

7K+ Views

We can resolve StaleElementReferenceException in Selenium webdriver. The term stale means something which is not fresh and decayed. Thus a stale element points to an element which is not present any more.There may be a case, when an element was in DOM initially but after modifications in Document Object Model ... Read More

How to click on hidden element in Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:09:36

4K+ Views

We can click on the hidden element in Selenium webdriver. In DOM, the hidden elements are the ones which are not displayed on the page. CSS property style should have the value display:none set for the hidden elements. Also, if the hidden element resides within a form tag, it can ... Read More

How to convert commands recorded in Selenium IDE to Java?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:09:24

2K+ Views

We can convert commands recorded in Selenium IDE to Java. To convert commands first navigate to File menu, then select the option Export Test case As.After clicking it, all the possible options for conversion get displayed. Choose the option Java/ Junit 4/ WebDriver.Finally, we have to save the file with ... Read More

Can Selenium interact with an existing browser session?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:04:23

5K+ Views

We can interact with an existing browser session. This is performed by using the Capabilities and ChromeOptions classes. The Capabilities class obtains the browser capabilities with the help of the getCapabilities method.This is generally used for debugging purposes when we have a large number of steps in a test and ... Read More

How do I set the Selenium webdriver get timeout?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:04:07

5K+ Views

We can set the Selenium webdriver to get timeout. There are numerous methods to implement timeouts. They are listed below −setScriptTimeout.pageLoadTimeout.implicitlyWait.The setScriptTimeout is the method to set the time for the webdriver. This is usually applied for an asynchronous test to complete prior throwing an exception. The default value of ... Read More

How to execute a Javascript function in Python with Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:00:11

3K+ Views

We can execute a JavaScript function in Python with Selenium webdriver. DOM interacts with the elements via JavaScript. Selenium is capable of executing JavaScript commands with the execute_script method.Few actions like web scrolling cannot be done by Selenium directly. For this, we shall use the JavaScript Executor. We shall take ... Read More

What are the prerequisites to learn Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:59:55

2K+ Views

We shall explore the prerequisites to learn Selenium. First of all, we should know that testing can be divided into two segments − Manual and Automation.For manual testing, it is essential to have the basic understanding of the application that we are going to test, a reasonable acumen and a ... Read More

How does the Selenium WebDriver work?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:54:22

405 Views

The working of Selenium webdriver is described in the below image −Source Img : https://www.tutorialspoint.com/what−is−web−driver−in−seleniumSelenium webdriver contains the below components −Selenium Binding Languages − Selenium can work on more than one language like Java, Python, C#, Ruby, and so on as it has the bindings for all these languages.JSON Wire ... Read More

How to set a cookie to a specific domain in selenium webdriver with Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:53:26

1K+ Views

We can set a cookie to a specific domain in Selenium webdriver with Python. A cookie is used to hold information sent by the browser. A key−value pair format is utilized and it is like a message provided to the browser by the server.For cookie addition, the method add_cookie is ... Read More

Advertisements