Skip to content

Commit

Permalink
Trying out the fix @predeekc offers for issue stirno#132.
Browse files Browse the repository at this point in the history
  • Loading branch information
scmccart committed Mar 15, 2016
1 parent 6b4790d commit 0e5475e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
27 changes: 17 additions & 10 deletions FluentAutomation.SeleniumWebDriver/Sizzle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,23 @@ private static string sizzleScriptInjection
}
}

public static void Inject(IJavaScriptExecutor executor)
{
try
{
if ((bool)executor.ExecuteScript("return typeof fluentjQuery == 'undefined'"))
{
executor.ExecuteScript(sizzleScriptInjection);
}
}
catch { }
public static void Inject(IJavaScriptExecutor executor)
{
try
{
if ((bool)executor.ExecuteScript("return typeof fluentjQuery == 'undefined'"))
{
if ((bool)executor.ExecuteScript("return typeof window.jQuery == 'undefined'"))
{
executor.ExecuteScript(sizzleScriptInjection);
}
else
{
executor.ExecuteScript("window.fluentjQuery = window.jQuery");
}
}
}
catch { }
}

public static BySizzle Find(string selector)
Expand Down
2 changes: 1 addition & 1 deletion FluentAutomation/Properties/AssemblyGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.0.1.0")]

0 comments on commit 0e5475e

Please # to comment.