This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User | |
{ | |
private String firstName; | |
private String surname; | |
private int age; | |
private String emailAddress; | |
} | |
//Then you could do the following | |
public void setFirstName(String firstName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So these are all the postits note I could find after the LeanBaconTeaCoffee at TestBash. | |
It was suggested by an attendee that these could make could help people formulate some blog ideas | |
so here they are! | |
1. Release candidate testing | |
2. Are unit checks only for programmers | |
3. When does a tester become a developer | |
4. Sustainable pace | |
5. Ant fucking (nit picking) how picky is it OK to be with testing? | |
6. Is there a way to inspire 9-5 testers? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Check if an argument was supplied | |
if [ -z "$1" ] | |
then | |
echo "No argument supplied, please provide video name" | |
else | |
# start recording | |
adb shell screenrecord --bit-rate 6000000 /sdcard/$1.mp4 & | |
# Get its PID | |
PID=$! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ProxyUsingChromeDriver() | |
{ | |
//Set the location of the ChromeDriver | |
System.setProperty("webdriver.chrome.driver", "C:\\Users\\Richard\\Desktop\\chromedriver.exe"); | |
//Create a new desired capability | |
DesiredCapabilities capabilities = DesiredCapabilities.chrome(); | |
// Create a new proxy object and set the proxy | |
Proxy proxy = new Proxy(); | |
proxy.setHttpProxy("localhost:8888"); | |
//Add the proxy to our capabilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ProxyUsingFirefoxDriver() | |
{ | |
//Create a new Firefox profile | |
FirefoxProfile firefoxProfile = new FirefoxProfile(); | |
//Then add the proxy setting to the Firefox profile we created | |
firefoxProfile.setPreference("network.proxy.http", "localhost"); | |
firefoxProfile.setPreference("network.proxy.http_port", "8888"); | |
//Then create a new Firefox Driver passing in the profile we created | |
//WebDriver we open a Firefox using this profile now | |
FirefoxDriver Driver = new FirefoxDriver(firefoxProfile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SettupUpAProxyUsingChromeDriver() | |
{ | |
//Create a chrome options object | |
var chromeOptions = new ChromeOptions(); | |
//Create a new proxy object | |
var proxy = new Proxy(); | |
//Set the http proxy value, host and port. | |
proxy.HttpProxy = "localhost:8888"; | |
//Set the proxy to the Chrome options | |
chromeOptions.Proxy = proxy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SettingUpAProxyUsingFirefoxDriver() | |
{ | |
//Create a new Firefox profile | |
var firefoxProfile = new FirefoxProfile(); | |
//Create a new proxy object | |
var proxy = new Proxy(); | |
//Set the http proxy value, host and port. | |
proxy.HttpProxy = "localhost:8888"; | |
//We then add this proxt setting to the Firefox profile we created | |
firefoxProfile.SetProxyPreferences(proxy); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webDriver.TakeScreenshot(@"C:\Temp\Richard.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using OpenQA.Selenium; | |
using OpenQA.Selenium.Support.UI; | |
using System; | |
using System.Drawing.Imaging; | |
namespace Richard.WebDriverExtensions | |
{ | |
public static class WebDriverExtensions | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BlogObject blogObject = new BlogObject (webDriver, 60); |