Hello,
Only started to play with C# since using the latest version of Zenno.
I am just trying to find out how to scroll to view to an element.
In this example, I have the outerhtml of the element. I tried to pass it as project.Variables["croll_to_view"].Value to instance.ActiveTab.MainDocument.FindElementByAttribute
// try find the html element
HtmlElement he = project.Variables["scroll_to_view_outerhtml"].Value;
// 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");
}
But the error I get is:
Compile code of Error in action "CS0029" "Cannot implicitly convert type 'string' to 'ZennoLab.CommandCenter.HtmlElement'". [Row: 1; Column: 18]
What is the best way with c# to scrolltoview with the outer html please?
Thank you.
Only started to play with C# since using the latest version of Zenno.
I am just trying to find out how to scroll to view to an element.
In this example, I have the outerhtml of the element. I tried to pass it as project.Variables["croll_to_view"].Value to instance.ActiveTab.MainDocument.FindElementByAttribute
// try find the html element
HtmlElement he = project.Variables["scroll_to_view_outerhtml"].Value;
// 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");
}
But the error I get is:
Compile code of Error in action "CS0029" "Cannot implicitly convert type 'string' to 'ZennoLab.CommandCenter.HtmlElement'". [Row: 1; Column: 18]
What is the best way with c# to scrolltoview with the outer html please?
Thank you.