Can't automate a right click on a spantag
Posted: Mon Apr 07, 2014 8:39 pm
I am attempting to automate a right-click on highlighted text that is a spantag.
This is the C# code that I am trying to use to set up the keyword:
switch (objEle.PreferredCapability.DisplayName)
{
case "DivTag":
DivTag _divTag = (DivTag)objEle;
_divTag.Click(System.Windows.Forms.MouseButtons.Right);
break;
case "SpanTag":
SpanTag _spanTag = (SpanTag)objEle;
_spanTag.Click(System.Windows.Forms.MouseButtons.Right);
break;
default:
Ranorex.WebElement ele = objEle;
ele.Click(System.Windows.Forms.MouseButtons.Right);
break;
I can't figure out how to get the information from Spy to show on this forum (otherwise I would show this as well). I am using Ranorex 4.1.
It pops up a window, but it is not the window I am expecting.
This is the C# code that I am trying to use to set up the keyword:
switch (objEle.PreferredCapability.DisplayName)
{
case "DivTag":
DivTag _divTag = (DivTag)objEle;
_divTag.Click(System.Windows.Forms.MouseButtons.Right);
break;
case "SpanTag":
SpanTag _spanTag = (SpanTag)objEle;
_spanTag.Click(System.Windows.Forms.MouseButtons.Right);
break;
default:
Ranorex.WebElement ele = objEle;
ele.Click(System.Windows.Forms.MouseButtons.Right);
break;
I can't figure out how to get the information from Spy to show on this forum (otherwise I would show this as well). I am using Ranorex 4.1.
It pops up a window, but it is not the window I am expecting.