Debomita Bhattacharjee has Published 863 Articles

How to Handle alerts in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:22:26

4K+ Views

We can handle alerts in Selenium webdriver by using the Alert interface. An alert can be of three types – a prompt which allows the user to input text, a normal alert and a confirmation alert.By default, the webdriver can only access the main page, once an alert comes up, ... Read More

How to stop a page loading from Selenium in chrome?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:21:56

10K+ Views

We can stop a page loading with Selenium webdriver in Chrome browser by using the JavaScript Executor. Selenium can execute JavaScript commands with the help of the executeScript command.To stop a page loading, the command window.stop() is passed as a parameter to the executeScript method. Also, for the Chrome browser ... Read More

How to refresh a webpage using Python Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:58:56

20K+ Views

We can refresh a webpage using Selenium webdriver in Python. This can be done with the help of the refresh method. First of all, we have to launch the application with the get method.Once a web page is loaded completely, we can then refresh the page with the help of ... Read More

Can we get the HTTP Response Code in Selenium with Java?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:58:29

3K+ Views

We can get the HTTP response code in Selenium webdriver with Java. Some of the response codes are – 2xx, 3xx, 4xx and 5xx. The 2xx response code signifies the proper condition, 3xx represents redirection, 4xx shows resources cannot be identified and 5xx signifies server problems.To obtain the response code ... Read More

What is the primary difference between the XPath and CSS selector in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:57:45

5K+ Views

There are some differences between the xpath and css selector. The format of xpath is //tagname[@attribute='value'] while the format of css selector is tagname[attribute='value'].We can traverse both forward and backward in DOM, i.e we can move from parent to child element and also from child to the parent element with ... Read More

How to Select Value from DropDown using Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:54:24

7K+ Views

We can select an option from the dropdown with its value attribute in Selenium webdriver by using the Select class. . A dropdown is represented by tag and the options are represented by tag.To select an option with its value we have to use the selectByValue method and ... Read More

How to extract text from a web page using Selenium and save it as a text file?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:52:47

5K+ Views

We can extract text from a webpage using Selenium webdriver and save it as a text file using the getText method. It can extract the text for an element which is displayed (and not hidden by CSS).We have to locate the element on the page using any of the locators ... Read More

Is it possible to manually set the attribute value of a Web Element using Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:49:31

4K+ Views

Yes it is possible to manually set the attribute value of a web element in Selenium webdriver using the JavaScript Executor. Selenium can run JavaScript commands with the help of the executeScript method.First, we shall identify the element on which we want to manually set the attribute value with the ... Read More

How to install TestNG in eclipse using Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:48:07

479 Views

We can install TestNG in Eclipse to create a test automation framework with the help of the following steps −First, we have to launch the Eclipse editor, click the menu Help, and then choose Eclipse Marketplace.The Eclipse Marketplace pop-up shall come up, enter TestNG in the search box and click ... Read More

Is navigate method available in Selenium Webdriver with Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 10:44:33

888 Views

The navigate method is not available in Selenium webdriver with Python.In order to navigate to a page, we can use the get method and pass the URL of the page that we want to launch as a parameter.In this method the webdriver waits till the webpage is completely loaded prior ... Read More

Advertisements