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
@stirno
stirno / FluentAutomation.csx
Last active December 14, 2016 13:36
FluentAutomation test running in scriptcs (tested againt dev branch)
using FluentAutomation;
using FluentAutomation.Interfaces;
using System;
using System.IO;
using System.Reflection;
private static INativeActionSyntaxProvider I = null;
public static void Bootstrap<T>(string browserName)
{
@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 / 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
@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);
{
contactEmail: 'support@datinix.net',
primaryIP: '72.232.233.254',
ttl: '14400',
refresh: '28800',
retry: '7200',
expire: '1209600',
minttl: '86400',
primaryNS: 'ns1.dtnxdns.net',
@stirno
stirno / gist:1305261
Created October 21, 2011 23:30
Ruby Test
require 'rubygems'
require 'json'
require 'net/http'
require 'uri'
teststeps = [
{
:name => "Open",
:arguments => {
:url => "http://www.google.com/"
@stirno
stirno / gist:1302873
Created October 21, 2011 01:22
FluentAutomation JSON Request
[{
"name": "Open",
"arguments": {
"url": "http://www.google.com/"
}
},
{
"name": "Enter",
"arguments": {
"value": "Fluent Automation",
@stirno
stirno / TestRun.json
Created October 19, 2011 14:46
Example Service API for Test Runner
{
Browser: "Firefox",
Steps: [
{
Command: "Open",
Arguments: [
URL: "http://www.google.com/"
]
},
{
{
"GroupObjects": [
{
"Id": 1,
"ValueIds": [
1,
2,
3
],
"ImportantIds": [