public static int Execute(Instance instance, IZennoPosterProjectModel project)
{
// clear cookie
instance.ClearCookie();
// go to lessons.zennolab.com
Tab tab = instance.MainTab;
if ((tab.IsVoid) || (tab.IsNull)) return -1;
if (tab.IsBusy) tab.WaitDownloading();
tab.Navigate("lessons.zennolab.com");
if (tab.IsBusy) tab.WaitDownloading();
// find elements by tag
HtmlElementCollection heCol = tab.FindElementsByTags("input:checkbox");
// get last element
HtmlElement he = heCol.Elements[heCol.Count-1];
// get index of 'he' in collection
int index = heCol.IndexOf(he);
return 0;
}
public static function Execute($instance, $project)
{
// clear cookie
$instance->ClearCookie();
// go to lessons.zennolab.com
$tab = $instance->MainTab;
if (($tab->IsVoid) || ($tab->IsNull)) return -1;
if ($tab->IsBusy) $tab->WaitDownloading();
$tab->Navigate("lessons.zennolab.com");
if ($tab->IsBusy) $tab->WaitDownloading();
// find elements by tag
$heCol = $tab->FindElementsByTags("input:checkbox");
// get last element
$he = $heCol->Elements[$heCol->Count-1];
// get index of 'he' in collection
$index = $heCol->IndexOf($he);
return 0;
}