Skip to content

Instantly share code, notes, and snippets.

View arjunbm13's full-sized avatar

armate arjunbm13

View GitHub Profile
@maggiesavovska
maggiesavovska / appiummac.md
Created May 31, 2017 20:29
Setting Up Appium on Mac
  1. Set up for Appium:
@arjunbm13
arjunbm13 / Selenium Best Practices
Created March 26, 2015 13:41
Selenium Best Practices to be followed
Selenium Best Practices,
Use PageObjects pattern
Be fluent with
- return this, varargs, generics,
- reuse your model and jodatime
Be robust and portable
- Prefered selector order : id > name > css > xpath
- Avoid Thread.sleep prefer Wait or FluentWait
- Use relative URLs
@klepikov
klepikov / Test.java
Last active August 25, 2023 03:12
Demo code for the GTAC 2013 talk "Web Performance Testing with WebDriver" by Michael Klepikov
import java.io.IOException;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import org.json.*;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.logging.*;
@krmahadevan
krmahadevan / GridInfoExtracter.java
Created February 8, 2012 08:25
A utility class that extracts the actual IP and port to which your remote executions are being routed to by Grid2
public class GridInfoExtracter{
private static String[] getHostNameAndPort(String hostName, int port,
SessionId session) {
String[] hostAndPort = new String[2];
String errorMsg = "Failed to acquire remote webdriver node and port info. Root cause: ";
try {
HttpHost host = new HttpHost(hostName, port);
DefaultHttpClient client = new DefaultHttpClient();
@krmahadevan
krmahadevan / ClassWithListener
Created February 3, 2012 07:08
Demo that shows how to make use of Event Firing Web Driver.
package com.test;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.events.EventFiringWebDriver;
import org.testng.annotations.Test;