This file contains hidden or 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
| var link = browser.FindViaJQuery(“.search_results.businesses .result a:contains(‘Applebees’)”).Click(); |
This file contains hidden or 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 WatiN.Core; | |
| namespace WatinSearchHelper | |
| { | |
| public static class BrowserExtensions | |
| { | |
| public static Element FindViaJQuery(this Browser browser, string cssSelector) | |
| { | |
| var elementId = browser.Eval(string.Format("WatinSearchHelper.getElementId(\"{0}\")", cssSelector)); | |
| return browser.Element(Find.ById(elementId)); | |
| } |
This file contains hidden or 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
| ;WatinSearchHelper = function ($) { | |
| var earTagId = 1; | |
| var getElementId = function (cssSelector) { | |
| var resultId = "_no_element_"; | |
| var el = $(cssSelector); | |
| if (el.length > 0) { | |
| var firstEl = el[0]; | |
| if (firstEl.id == "") { | |
| // Give this element a contrived id so we can find it directly from the WatiN side: |
This file contains hidden or 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
| # Creating a new git repository based on the subdirectory of an existing repository | |
| # Got this from: http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository | |
| git clone --no-hardlinks project327 compass | |
| cd compass | |
| git filter-branch --subdirectory-filter bloomfire-compass HEAD -- --all | |
| git reset --hard | |
| git gc --aggressive | |
| git prune |
This file contains hidden or 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
| class String | |
| def from_json | |
| ActiveSupport::JSON.decode(self) | |
| end | |
| end |
NewerOlder