Forum Discussion
HI surbhik.
A couple of things that might cause the ClickItem() failure.
1. Your path might require the path separator (a pipe in your case) at the very begnining...so
"Edit|Copy" might need to be "|Edit|Copy"
2. the drop down menu might use a different path separator than the Pipe, like a backslash, so you need to check that. You should be able to see that property it with the ObjectSpy or you can just get it in the code.
Here would be a modified version of your original code...
function Test2()
{
let catsv3 = Aliases.CATSV3;
let LHMenuStrip = catsv3.TabWindow.mainMenuStrip;
LHMenuStrip.Click(94, 13);
// your path might require a pipe to start
var menuItemPath = "|Edit|Copy";
// if the menuStrip has a pathSeparator then you might need to get that and replace the pipes in your path
if (aqObject.IsSupported(catsv3, "PathSeparator") && catsv3.ToolStripDropDownMenu.PathSeparator != "|")
menuItemPath = aqString.Replace(menuItemPath, "|", catsv3.ToolStripDropDownMenu.PathSeparator,);
catsv3.ToolStripDropDownMenu.ClickItem(menuItemPath );
}
I hope this helps.
Related Content
- 2 years ago
- 2 years ago
Recent Discussions
- 2 hours ago
- 6 days ago
- 10 days ago