Debomita Bhattacharjee has Published 863 Articles

Need Selenium to wait until the document is ready

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:44:07

6K+ Views

We can wait until the document is ready (page loaded completely) in Selenium by applying the method pageLoadTimeout. The wait time is passed as a parameter to this method.The webdriver waits for this duration for the page to load completely. If this time gets elapsed without page loading, a TimeoutException ... Read More

Scroll element to the middle of the screen with Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:42:35

4K+ Views

We can scroll to the middle of the screen with Selenium webdriver using the JavaScript Executor. Selenium can execute JavaScript commands with the help of the executeScript method.To scroll to the middle of the screen, we have to first identify the element upto which we want to scroll on the ... Read More

How can I download Microsoft WebDriver/Edge Driver to use with Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:29:20

4K+ Views

We can download Microsoft/Edge Driver to use with Selenium. The Microsoft Edge driver allows communication of the tests developed in Selenium with the Edge browser.To download the msedgedriver.exe file, we have to first navigate to the following link − https://developer.microsoft.com/en-us/microsoftedge/tools/webdriver/#downloadsThen move to the Downloads section, and click on the link ... Read More

What is the best way to handle a Javascript popup using Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:28:04

581 Views

We can handle a JavaScript pop-up using Selenium webdriver with the help of the Alert interface. The alerts are pop-ups that shift the focus from the main webpage to the alert text appearing on the page.By default, the webdriver has focus on the main page, to access the alert we ... Read More

How to avoid “StaleElementReferenceException” in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:27:24

594 Views

The StaleElementReferenceException is thrown if the webdriver makes an attempt to access a web element which is currently not available or invalid in DOM.This can be due to refresh of the page or an element is accidentally deleted or modified or no longer connected to DOM. This type of exception ... Read More

sendKeys() not working in Selenium Webdriver

Debomita Bhattacharjee

Debomita Bhattacharjee

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

6K+ Views

If we encounter issues while working with the sendKeys method, then we can use the JavaScript Executor to input text within an edit box. Selenium can run JavaScript commands with the help of the executeScript method.JavaScript command to be used is passed as a parameter to this method. To input ... Read More

How to submit a form in Selenium webdriver if submit button can't be identified?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:25:44

2K+ Views

We can submit a form in Selenium webdriver even if the submit button cannot be identified. This can be achieved by locating any element within the form tag and the applying submit method on it. A form in the html code is identified by the tag.Let us investigate the ... Read More

How to Scroll Down or UP a Page in Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:25:17

9K+ Views

We can scroll down or up a page in Selenium webdriver using JavaScript Executor. Selenium can execute JavaScript commands with the help of the executeScript method.To scroll down vertically in a page we have to use the JavaScript command window.scrollBy. Then pass the pixel values to be traversed along the ... Read More

How to click on sign up button using Java in Selenium I am able to open page but not able to click?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 06-Apr-2021 11:24:14

4K+ Views

We can click on the Sign up button using Java in Selenium. First of all, we have to identify the Sign up button with the help of any of the locators like id, class name, name, link text, xpath, css or partial link text. After identification, we have to click ... Read More

Need to wait until page is completely loaded - Selenium WebDriver

Debomita Bhattacharjee

Debomita Bhattacharjee

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

5K+ Views

We can wait until the page is completely loaded in Selenium webdriver by using the JavaScript Executor. Selenium can run JavaScript commands with the help of the executeScript method.We have to pass return document.readyState as a parameter to the executeScript method and then verify if the value returned by this ... Read More

Advertisements