101. How to switch between frames in Selenium?
Answer: By using the following code, we could switch between frames.
Ex:
driver.switchTo().frame(id);
driver.switchTo().frame(name);
driver.switchTo().frame(index);
102. How to resize browser window using selenium webdriver?
Answer: To resize the browser window to particular dimensions, we use “Dimension” class to resize the browser window.
Ex: //create object of Dimension class
Dimension d = new Dimension(480, 620);
//resize the current window to the given dimension
driver.manage().window().setSize(d);
103: How to Scroll web page down or up using Selenium Webdriver?
Answer: Using Javascript Executer. We have scrollBy() method in JavascriptExecuter that scrolls the document by the specified number of pixels.
104. How to perform Right Click Action (Context Click) in Selenium webdriver?
Answer: We use Actions class in Selenium Webdriver to do Right-Click(Context Click) action.
Ex: Actions action = new Actions(driver);
action.contextClick(driver.findElement(By.xpath(“xpath”))).build().perform();
105. How to perform Double Click Action in Selenium webdriver?
Answer: We use Actions class in Selenium to do Double-Click action.
Ex: Actions action = new Actions(driver);
action.doubleClick(driver.findElement(By.xpath(“xpath”))).build().perform();
106. How to perform Drag and Drop Action using Selenium?
Answer: We can use the Actions class to perform drag and drop.
Ex: Actions action = new Actions(driver);
action.clickAndHold(driver.findElement(By.xpath())).moveToElement(driver.findElement(By.xpath())).release().build().perform();
107. How to Highlight an Element using Selenium webdriver?
Answer: By using JavaScriptExecuter Interface, we could highlight the specified element.
How to connect a database in Selenium?
How can you find broken links and images in a page using selenium webdriver?
How to Read and Write Excel file in Selenium using Apache POI?
What is Data Driven Framework in Selenium?
How to Integrate MAVEN with Selenium?
How to configure Eclipse with Selenium and TestNG?
How to create a TestNG Program and Execute?
How to configure Eclipse with Selenium and TestNG?
How to check reports generated by TestNG?
How to do Cross browser testing using TestNG?
How to create Data driven framework using DataProivider?
How to execute only failed testcases in Selenium Webdriver?
How to disable testcase in Selenium using TestNG?
How to group Testcases in Selenium using TestNG?
How to create dependency between Test cases in Selenium Webdriver?
How to execute testng.xml file through Java Program?
How to Execute Selenium Webdriver Test cases parallel using TestNG?
How to capture error message in Selenium Webdriver?
How to execute JavaScript code in Selenium? Write syntax?
How to perform CTRL+TAB key in Selenium?
How to capture screenshots of failed test cases in Selenium Webdriver?
How to handle Calendar in Selenium Webdriver?
How to handle Exception in Webdriver?
hi,your blog is very useful. all the questions are so challenging. thank you for posting all important questions.
http://www.trainingpune.in/selenium-training-in-pune.html