| ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > Instance Class : FindElementByIntelliSearch Method |
Type: System.String
The form for searching. It's can be name on one of supported languages or id from current IntelliSearch base.
Type: System.String
The class of element for searching. It's can be name on one of supported languages or id from current IntelliSearch base.
Type: System.Boolean
The true if are searching html link; otherwise false. In case then isLink is true, parameter "form" can be empty. It's not error if "form" not empty, however this parameter is not used.
Type: System.Boolean
The true if allowed to search among the locked html elements; otherwise false.
public HtmlElement FindElementByIntelliSearch( string form, string elementClass, bool isLink, bool inBlocked )
Type: System.String
The form for searching. It's can be name on one of supported languages or id from current IntelliSearch base.
Type: System.String
The class of element for searching. It's can be name on one of supported languages or id from current IntelliSearch base.
Type: System.Boolean
The true if are searching html link; otherwise false. In case then isLink is true, parameter "form" can be empty. It's not error if "form" not empty, however this parameter is not used.
Type: System.Boolean
The true if allowed to search among the locked html elements; otherwise false.
Type: HtmlElement
The element found by the search.
The parameters form and elementClass can be name on one of supported languages or id from current IntelliSearch base. IntelliSearch not depend not on the language or the version of the program. IntelliSearch is a multi-language system. However, depends on the current versions of the standard base and additional base (user base). Currently supports two languages: English and Russian. Do not forget that before using IntelliSearch must choose one of the standard base. Also the name of a class of elements and forms may vary in different versions of the base. The case of strings does not matter.
The parameter isBlocked should use if need find html element which was used by IntelliSearch. After using of the element, IntelliSearch marks html element as a blocked and ignores it in followings searching. If need find element among all or among the blocked then isBlocked should be true; otherwise false.
// clear cookie instance.ClearCookie(); // navigate to lessons.zennolab.com instance.ActiveTab.Navigate("lessons.zennolab.com", ""); // waiting for downloading instance.ActiveTab.WaitDownloading(); // find link by IntelliSearch HtmlElement he = instance.FindElementByIntelliSearch("", "Simple registration", true, false); // if html element found if (!he.IsVoid) { // click on link he.RiseEvent("click", "Full"); } // find password field he = instance.FindElementByIntelliSearch("Registration", "Password", false, false); // if html element found if (!he.IsVoid) { // set value he.SetValue("password", "Full", false); } // find password field again in blocked he = instance.FindElementByIntelliSearch("Registration", "Password", false, true); // if html element found if (!he.IsVoid) { // get value return he.GetValue(false); }
// clear cookie $instance->ClearCookie(); // navigate to lessons.zennolab.com $instance->ActiveTab->Navigate("lessons.zennolab.com", ""); // waiting for downloading $instance->ActiveTab->WaitDownloading(); // find link by IntelliSearch $he = $instance->FindElementByIntelliSearch("", "Simple registration", true, false); // if html element found if (!$he->IsVoid) { // click on link $he->RiseEvent("click", "Full"); } // find password field $he = $instance->FindElementByIntelliSearch("Registration", "Password", false, false); // if html element found if (!$he->IsVoid) { // set value $he->SetValue("password", "Full", false); } // find password field again in blocked $he = $instance->FindElementByIntelliSearch("Registration", "Password", false, true); // if html element found if (!$he->IsVoid) { // get value return $he->GetValue(false); }
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven