Tags » Selenium

Simulate Firefox as an Android

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
public class SimulateFFasAndroid {

public static void main(String[] args) throws InterruptedException {
FirefoxProfile fp = new FirefoxProfile();

//the useragent string is got from the previous post… 42 more words

Selenium

Get User Agent String through code

import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

public class GetUserAgentString {

public static void main(String[] args) throws MalformedURLException {

//before executing the below code, make sure that webdriver has started on the device and the port has been forwarded… 50 more words

Selenium

Allowing username in URL

Step 1:

create a .reg file as below and update it to windows registry.

Windows Registry Editor Version 5.00


“iexplore.exe”=dword:00000000

Step 2:

Pass your URL as… 29 more words

QTP And VbScript

Load the default firefox profile

ProfilesIni profilesIni = new ProfilesIni();
FirefoxProfile profile = profilesIni.getProfile(“default”);

DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, profile);

WebDriver driver = new FirefoxDriver(dc);

Selenium

EventFiringWebDriver, WebDriverEventListener, and AbstarctWebDriverEventListener

Before getting into the sample code, lets have a look on EventFiringWebDriver, WebDriverEventListener, and AbstarctWebDriverEventListener descriptions.

  • EventFiringWebDriver is a class and wrapper around an arbitrary webdriver instance which supports registering of a WebDriverEventListener.
  • 233 more words
Selenium Webdriver

Selenium Locators xpath and css

xpath

————————————-

1) full xpath

html/body/div/div[2]/form/div[1]/input

2) Multiple parameters in xpath

//input[@type=’submit’ and @class=”xyz]

3) Position in xpath

(//span)

4) Using OR in xpaths

//a|//a… 229 more words

Selenium

Setting up your Production-ready Polymer 1.0 Application Development

Any technology we choose to build our project, it is very important that our project lifecycle is managed with effective set of tools that make our overall project development efficient. 2,380 more words

Polymer