Skip to content

Instantly share code, notes, and snippets.

@stirno
stirno / .block
Created October 29, 2018 00:18 — forked from henryjameslau/.block
D3-hexjson by Oli Hawkins with background grid
license: gpl-2.0
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
@stirno
stirno / findmultiple.cs
Created May 25, 2014 23:35
FindMultiple iterate over items
I.FindMultiple("div").Elements.ForEach((elementTuple) =>
{
var commandProvider = elementTuple.Item1;
var elementFunc = elementTuple.Item2;
var element = elementFunc();
// do things with element
});
var gulp = new Gulp();
gulp.Task("Compile CSS", () =>
{
gulp.Source("*.less", "*.sass", "*.scss")
.Pipe("less$", new GulpLess())
.Pipe("(sass|scss)$", new GulpSass())
.Destination("~/bin");
});
@stirno
stirno / Features.md
Last active August 29, 2015 13:57
Changes for FluentAutomation v3.0

FluentAutomation v3.0 Changelog

######Multi-browser support with I.Find

Change from Func<Element> to ElementProxy

######New configuration syntax

Config
@stirno
stirno / Install Steps
Created February 22, 2014 06:21
scriptcs + FluentAutomation
scriptcs -install FluentAutomation.SeleniumWebDriver
scriptcs -install ScriptCs.FluentAutomation
@stirno
stirno / test.cs
Last active August 29, 2015 13:56
Expect cookie exists with value
[TestClass]
public class AcceptanceTest1 : FluentAutomation.FluentTest<OpenQA.Selenium.IWebDriver>
{
public AcceptanceTest1()
{
FluentAutomation.SeleniumWebDriver.Bootstrap(FluentAutomation.SeleniumWebDriver.Browser.Chrome);
}
[TestMethod]
public void TestMethod1()
@stirno
stirno / BingTest.cs
Last active October 5, 2016 11:47
Sample of FluentAutomation page objects, round 1
namespace FluentAutomation.Tests
{
public class BingSearchPage : PageObject<BingSearchPage>
{
public BingSearchPage(FluentTest test)
: base(test)
{
Url = "http://bing.com/";
At = () => I.Expect.Exists(SearchInput);
}
@stirno
stirno / Steps.cs
Last active December 28, 2015 11:18
var execPath = this.CreateExecutionDirectory();
var scriptName = Guid.NewGuid().ToString() + ".csx";
var console = new ScriptConsole();
var builder = new ScriptServicesBuilder(console, new Common.Logging.Simple.TraceLogger(false, "ScriptCs", Common.Logging.LogLevel.All, true, true, false, "hh:mm:ss"));
builder.ScriptName(scriptName).InMemory(true);
var services = builder.Build();
var packages = services.PackageAssemblyResolver.GetPackages(execPath);
@stirno
stirno / gist:6217404
Created August 13, 2013 02:43
Sample for changing the settings used for a web driver instance - Need to make this suck less
public class ThisIsATestClass : FluentTest
{
public ThisIsATestClass()
{
FluentAutomation.SeleniumWebDriver.Bootstrap(FluentAutomation.SeleniumWebDriver.Browser.Chrome);
var containerRegistration = FluentAutomation.Settings.Registration;
FluentAutomation.Settings.Registration = (container) =>
{
// Call default registration method from Bootstrapper