Difficulty in recognising some objects on right-click menus for .Net application
I am testing a .net application .I open an xls file in the tool under testing. In the screenshot,I am creating a block in the excel file and then delete it. On the right-click menu displayed in screenshot,I need to click 'Delete Block'.The recorded script is like this but when I run it everything runs fine but somehow it does not click the option 'Delete Block' and gives an error :
"There was an attempt to perform an action at point (71, 71) which is invisible or out of the window bounds. "
function Test1() /create and delete block
{
var burster;
var workbookView;
burster = Sys.Process("Burster");
workbookView = burster.frmSpreadsheetGear.WinFormsObject("Panel1").TableLayoutPanel1.WorkbookView;
workbookView.Click(391, 113);
workbookView.ClickR(391, 113);
workbookView.PopupMenu.Click("Convert Cell to Block");
burster.frmDefineBlock.VBObject("cmdOK").ClickButton();
workbookView.Click(684, 193);
workbookView.ClickR(469, 123);
workbookView.PopupMenu.Click("Delete Block"); //Delete the block.
}
Also if I only use this function separately to delete the block,it works fine.Everything is same ,its just that I tried deleting the block using a separate function but lines of code.
function Test2()
{
var workbookView;
workbookView = Sys.Process("Burster").frmSpreadsheetGear.WinFormsObject("Panel1").TableLayoutPanel1.WorkbookView;
workbookView.ClickR(415, 125);
workbookView.PopupMenu.Click("Delete Block");
}
Please help me with this issue ..
Thanks,
Sumedha
Test1() /create and delete block { burster; workbookView;burster = .Process("Burster");workbookView = burster.frmSpreadsheetGear.WinFormsObject("Panel1").TableLayoutPanel1.WorkbookView;workbookView.Click(391, 113);workbookView.ClickR(391, 113);workbookView.PopupMenu.Click("Convert Cell to Block");burster.frmDefineBlock.VBObject("cmdOK").ClickButton();workbookView.Click(684, 193);workbookView.ClickR(469, 123);workbookView.PopupMenu.Click("Delete Block"); //Delete the block.}Also if I only use this function separately to delete the block,it works fine.Everything is same ,its just that I tried deleting the block using a separate function but lines of code. Test2(){ workbookView;workbookView = .Process("Burster").frmSpreadsheetGear.WinFormsObject("Panel1").TableLayoutPanel1.WorkbookView;workbookView.ClickR(415, 125);workbookView.PopupMenu.Click("Delete Block");}Please help me with this issue ..Thanks,Sumedha