Debomita Bhattacharjee has Published 867 Articles

What does explicit wait perform?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 14:36:27

356 Views

Explicit waits are applied to a specific element in the web page. It shall pause the execution till the condition is satisfied. Explicit wait is also a dynamic one since if the wait time is fifteen seconds and the conditions (like waiting for an element to be clickable, visible or ... Read More

What does implicit wait perform?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:52:48

509 Views

Implicit is the default waiting time for each test step in our execution. Thus if we keep an implicit wait of ten seconds, each test step will wait for that amount of time for an action to take place and then move to the next step.Implicit wait is a dynamic ... Read More

What are the different types of wait available in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:51:04

594 Views

The different types wait available in Selenium are listed below −Implicit waitThis is one of dynamic waits in Selenium with the Syntax as −driver.manage().timeouts().implicitlyWait(12, TimeUnit.SECONDS);Explicit waitThis is one of dynamic waits in Selenium with the Syntax as −WebDriverWait w = new WebDriverWait(driver, ); w.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("")));Fluent waitThis is one of dynamic waits ... Read More

How to set the size of the browser window in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:46:08

3K+ Views

We can set the size of the browser window by the following methods −getSize() methodJavascript executorExampleWith setSize() method.import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; import java.util.List; public class BrowserDimension {    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       ... Read More

How to perform scrolling action on page in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:44:08

928 Views

We can perform the following actions with respect to scrolling in Selenium −Vertical scrollingThe scrolling down to a specific pixel.JavascriptExecutor j = (JavascriptExecutor) driver; // scroll down by 1500 pixel with coordinates 0 and 1500 in x, y axes j.executeScript("window.scrollBy(0, 1500)");The scrolling down to the bottom of the page.JavascriptExecutor j ... Read More

How to extract the attribute value of an element in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:35:43

872 Views

We can extract the attribute value of an element in Selenium with the help of getAttribute() method. Once we locate the element, this method is used to get the attribute value of the element and assigned to a variable.Exampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; ... Read More

How to press ENTER inside an edit box in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:34:13

621 Views

Selenium gives Enum Key macros to perform the enter action.Exampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; import java.util.List; public class PressEnter {    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       WebDriver driver = new ChromeDriver();       ... Read More

What are the differences between get() and navigate() method?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:32:34

7K+ Views

The differences between get() and navigate() methods are listed below.sl.no.get()navigate()1It is responsible for loading the page and waits until the page has finished loading.It is only responsible for redirecting the page and then returning immediately.2It cannot track the history of the browser.It tracks the browser history and can perform back ... Read More

How to perform browser navigations in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:24:52

509 Views

There are various navigate() methods to perform navigations in Selenium. They are as the listed below −navigate().to(url)This is used to launch a new browser and open a particular URL as in the parameter.navigate().refresh()This is used to reload a page.navigate().back()This is used to jump to the previous page as per browser ... Read More

What are the differences between findElement() and findElements() methods?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 10-Jun-2020 13:19:00

774 Views

findElement() and findElements() method tries to search an element in DOM.The differences between them are listed below −sl.no.findElement()findElements()1It returns the first web element which matches with the locator.It returns all the web elements which match with the locator.2Syntax − WebElement button = webdriver.findElement(By.name(""));Syntax − List buttons = webdriver.findElements(By.name(""));3NoSuchElementException is thrown ... Read More

Advertisements