Skip to content

Instantly share code, notes, and snippets.

@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)
{
{
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": [
@stirno
stirno / gist:1177089
Created August 28, 2011 19:23
FluentAutomation API Sample - KnockoutJS CartEditor Demo Test
[TestMethod]
public void CartEditor_AddDelete()
{
I.Use(BrowserType.InternetExplorer);
I.Open("http://knockoutjs.com/examples/cartEditor.html");
I.Select(2).From("#cartEditor tr select:eq(0)");
I.Select(2).From("#cartEditor tr select:eq(1)");
I.Enter(6).In("#cartEditor td.quantity input:eq(0)");
I.Expect.This("$197.70").In("#cartEditor tr span:eq(1)");
@stirno
stirno / gist:1176470
Created August 28, 2011 09:28
Fluent Automation API Sample
using FluentAutomation.API;
using FluentAutomation.API.Enumerations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FluentAutomation.Samples
{
/// <summary>
/// Fluent Automation API for the Web - http://www.stirno.com/fluentautomation
/// </summary>
[TestClass]
@stirno
stirno / gist:1176188
Created August 28, 2011 03:05
Example automation test API
[TestClass]
public class LoginTests : StirnoTestDriver
{
[TestMethod]
public void Login_HappyPath()
{
I.Use(BrowserType.InternetExplorer);
I.Open("http://idev05/Login");
// Validate expected strings on page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DTNX.DNS.DataAccess.Repositories
{
public class RepositoryBase<T> where T : ModelBase
{
public RepositoryBase()