Bumblebee.Extensions.JQueryExtensions.HasJQuery C# (CSharp) Метод

HasJQuery() публичный статический Метод

This method is for determining if a Session has access to jQuery.
public static HasJQuery ( this session ) : bool
session this The Session in question.
Результат bool
		public static bool HasJQuery(this Session session)
		{
			// given the way the JavaScript is executed, using the simple variable name 'jQuery' here throws an InvalidOperationException
			// this can be reproduced in the browser (tested in Chrome) by running "new Function('return !!jQuery;')()" in the developer console
			// on a page that does not have a jQuery variable defined

			return session.ExecuteJavaScript<bool>(@"return !!window[""jQuery""];");
		}
	}
JQueryExtensions