| ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > HtmlElement Class : ScrollIntoView Method |
public void ScrollIntoView()
// navigate to lessons.zennolab.com instance.ActiveTab.Navigate("lessons.zennolab.com", ""); // wait downloading instance.ActiveTab.WaitDownloading(); // try find the html element HtmlElement he = instance.ActiveTab.MainDocument.FindElementByAttribute("textarea", "name", "text", "text", 0); // if html element was found if (!he.IsVoid) { // scroll view of tab to the html element he.ScrollIntoView(); // performs the click inside tab by coordinates instance.ActiveTab.MouseClick(he.DisplacementInTabWindow.X + 10, he.DisplacementInTabWindow.Y + 10, "left", "click"); // send the text instance.SendText("It's just example. If you see this text then all work correctly. Don't forget to buy one more ZennoPoster.", 75); }
// navigate to lessons.zennolab.com $instance->ActiveTab->Navigate("lessons.zennolab.com", ""); // wait downloading $instance->ActiveTab->WaitDownloading(); // try find the html element $he = $instance->ActiveTab->MainDocument->FindElementByAttribute("textarea", "name", "text", "text", 0); // if html element was found if (!$he->IsVoid) { // scroll view of tab to the html element $he->ScrollIntoView(); // performs the click inside tab by coordinates $instance->ActiveTab->MouseClick($he->DisplacementInTabWindow->X + 10, $he->DisplacementInTabWindow->Y + 10, "left", "click"); // send the text $instance->SendText("It's just example. If you see this text then all work correctly. Don't forget to buy one more ZennoPoster.", 75); }
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.