What exception will be thrown when we use "findElement" method? NoSuchElementException will be thrown when the locator is not found in the DOM and no longer available. How will you handle popups windows in Selenium? We can handle popups in Selenium is simple. It provides various methods from WebDriver interface. They are, 1. getWindowHandle() 2. getWindowHandles() getWindowHandle() - deals with current window getWindowHandles() - it manages with multiple windows and returns set of instances Let me show an example to understand this better, import java.util.Iterator; import java.util.Set; import org.openqa.selenium.firefox.*; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import org.testng.annotations.AfterTest; public class PopupDemo { private WebDriver driver; @BeforeTest public void setUp() { System.setProperty("webdriver.firefox.bi
Hi, This query will fetch the rows which is the most large value / maximum value. --Maximum value SELECT MAX( spend ) FROM edw_aggregate.vw_agg_order_automation WHERE spend < ( SELECT MAX( spend ) FROM edw_aggregate.vw_agg_order_automation ); The above query will only fetch top most value from the table. If we want to fetch Nth maximum / minimum value, look into this query. --Nth Minimum/Max SELECT MIN( spend ) FROM edw_aggregate.vw_agg_order_automation where spend in (SELECT top 5 spend FROM edw_aggregate.vw_agg_order_automation order by spend desc) Thanks