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
Sign up for a GitHub Account Sign in | |
Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository. | |
language: F# ACE Editor indent mode: Spaces indent size: 2 | |
230 | |
231 | |
232 | |
233 |
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
// Learn more about F# at http://fsharp.net | |
open System | |
let mutable tests = [] | |
let test f = tests <- List.append tests [f] | |
let xtest f = () | |
let mutable before = fun () -> () | |
let run _ = List.map (fun f -> (before () | |
f ())) tests | |
let describe description = Console.WriteLine(description.ToString()) |
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
open canopy | |
open runner | |
start chrome | |
"#lastName should have Doe" &&& (fun _ -> | |
url "http://lefthandedgoat.github.io/canopy/testpages/" | |
let jsResult = js "return $('#testfield1');" | |
let jsResult2 = js "return document.getElementById('testfield1');" | |
let i = 0 |
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
module canopyExtensions | |
open canopy | |
//this one lets the exception bubble up on failure | |
let count cssSelector count = | |
canopy.core.count cssSelector count | |
true | |
//or |
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
//safe to run this code, it works | |
open canopy | |
open runner | |
type Person() = class | |
member val FirstName : string = null with get, set | |
member val LastName : string = null with get, set | |
end |
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
let on (u: string) = | |
try | |
wait pageTimeout (fun _ -> browser.Url = u) | |
with | |
| ex -> raise (CanopyOnException(sprintf "on check failed, expected %s got %s" u browser.Url)); |
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
let skipTo stepName client = | |
let wizardSteps = [ | |
(20, 1, "Company Info"); | |
(48, 1, "Login"); | |
(49, 1, "Password Rules"); | |
... lots more | |
(66, 13, "Publish Rules");] | |
if not (wizardSteps |> List.exists(fun (id, groupid, name) -> name = stepName)) then failwith (sprintf "Step %s does not exist" stepName) | |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Massive; | |
using Oak; | |
namespace ConsoleApplication1 | |
{ | |
public class DynamicPerson : DynamicModel | |
{ |
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
//first read about how to do something similar here: | |
http://atombrenner.blogspot.com/2012/09/embed-url-links-in-teamcity-build-logs.html | |
//plugin location | |
http://confluence.jetbrains.com/display/TW/StaticUIExtensions | |
//download at: | |
http://teamcity.jetbrains.com/repository/download/TeamCityPluginsByJetBrains_StaticUiExtensionsAgainstTeamCity8/latest.lastSuccessful/static-ui-extensions.zip | |
//after downloading you can go to you team city administrator, go to plugins, and upload the one you just downloaded | |
//restart TC web server so that it registers the plugin, once you go back you should have 1 more |
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
Running selenium tests via Team City as a windows service has a resolution of 1024x768. I tryed adding/changing DefaultSettings.XResolution and YResolution in the registry with no luck. What did work was running TC agent in the console as a logged in user. | |
Use these instructions to setup a user to automatically log in when your box starts up | |
http://www.win2008workstation.com/configure-auto-logon/ | |
Add shortcut to the startup forlder on start menu: | |
C:\Users\YOUUSER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup | |
that points to your team city agent's start.bat with 'start' parameter |