Selenium

  • 26
    Jun

    check if a checkbox is checked in selenium webdriver

    package SeleniumPractice; import java.text.ParseException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import org.testng.Assert; import org.testng.annotations.Test; public class AddCookiesInSelenium { WebDriver driver; @Test...

    Read More
  • 26
    Jun

    scroll a long web page in selenium webdriver

    package SeleniumPractice; import java.text.ParseException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import org.testng.Assert; import org.testng.annotations.Test; public class AddCookiesInSelenium { WebDriver driver; @Test...

    Read More
  • 26
    Jun

    drag and drop with selenium webdriver

    package SeleniumPractice; import java.text.ParseException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import org.testng.Assert; import org.testng.annotations.Test; public class DragAndDropInSelenium { WebDriver driver; @Test public void...

    Read More
  • 26
    Jun

    working with menus in Selenium (mouseover and click on link)

    package SeleniumPractice; import java.text.ParseException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import org.testng.annotations.Test; public class Workingwithmenus { WebDriver driver; @Test public void enterText() throws InterruptedException, ParseException...

    Read More
  • 26
    Jun

    add custom cookie with selenium webdriver

    package SeleniumPractice; import java.text.ParseException; import java.util.Set; import java.util.concurrent.TimeUnit; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.Test; public class AddCookiesInSelenium { WebDriver driver; @Test public void enterText() throws InterruptedException, ParseException...

    Read More
  • 26
    Jun

    Multithreaded initializing of browsers with Selenium web driver

    Internet Explorer Driver InternetExplorerDriver is a standalone server which implements WebDriver’s wire protocol. This driver has been tested with IE 7, 8, 9, 10, and 11 on appropriate combinations...

    Read More
  • 09
    Jan

    Initializing iOS or Android drivers

    public static Appiumdriver driver; AppiumServiceBuilder serviceBuilder = new AppiumServiceBuilder().usingAnyFreePort(); service=AppiumDriverLocalService.buildService(serviceBuilder); service.start(); driver = (isTargetAndroid()) ? getAndroidDriver(service.getUrl(), false, false) : getIOSDriver(service.getUrl(), false, false); where isTargetAndroid() is a private method in...

    Read More
  • 09
    Jan

    Selenium drivers for Mobile automation

    RemoteWebDriver: This driver class comes directly from the upstream Selenium project. This is a pretty generic driver where initializing the driver means making network requests to a Selenium hub...

    Read More
  • 08
    Jan

    Screen orientation in Mobile browsers

    //Changing screen Orientation to LANDSCAPE. driver.rotate(org.openqa.selenium.ScreenOrientation.LANDSCAPE); //Changing screen Orientation to PORTRAIT. driver.rotate(org.openqa.selenium.ScreenOrientation.PORTRAIT);   reference

    Read More
  • 08
    Jan

    Handle non-trusted connection in Selenium WebDriver

    A trusted SSL certificate helps to validate the authenticity of the website. In case it doesn’t, you will get an error message from your browser for “non-trusted connection”.  An Untrusted...

    Read More