Forum Discussion
What's in fn_Element_Instance_Excel? It seems that would be where the problem would be since that is the only code that would explictly be doing anything with Excel.
There are certain other sub functions which are getting called inside this method.
But i think problem is occurring when i am trying to click on tabObjectName in the previous code only.
But you can refer the below code if it helps
function fn_Element_Instance_Excel(counter) // This function is used to create instances in Excel.
{
var str;
for(var i = 0; i < newQuestionIds.length; i++)
{
str = Sys.Process("iexplore").Page("*").Panel(1).Panel(0).Panel("accordion_panel").Panel(3).Panel("innerQuestionDiv").Panel(0).Table("tableQue").Cell(i, 0).Panel(0).Panel("q_question_" + newQuestionIds[i]).Label("q_questionLabel_" + newQuestionIds[i]).innerText;
str = trim(str);
if((CompareProperty(str, cmpEqual, "List Custom List Box", true)) || (CompareProperty(str, cmpEqual, "List Custom Drop Down", true)) || (CompareProperty(str, cmpEqual, "List Custom Check Box", true)) || (CompareProperty(str, cmpEqual, "List Custom Radio Button", true)))
{
// do nothing becoz Custom List is not available in excel spreadsheet
}
else
{
fn_Edit_Pencil(i);
// fn_Drag_Element_Window_Excel();
Delay(2000);
if(CompareProperty(str, cmpEqual, "Date", true))
{
fn_Date_Element_Instance_Excel("B1");
fn_Write_Into_Log_File("• Element \"Date\" Instance " + counter + " in Excel is created successfully. => " + new Date() + "\n");
Delay(2000);
}
else if(CompareProperty(str, cmpEqual, "Currency", true))
{
fn_Currency_Element_Instance_Excel("B2");
fn_Write_Into_Log_File("• Element \"Currency\" Instance " + counter + " in Excel is created successfully. => " + new Date() + "\n");
Delay(2000);
}
else if(CompareProperty(str, cmpEqual, "Text", true))
{
fn_Text_Element_Instance_Excel("B3");
fn_Write_Into_Log_File("• Element \"Text\" Instance " + counter + " in Excel is created successfully. => " + new Date() + "\n");
Delay(2000);
}
else break;
}
}
fn_Save();
}
thanks
Related Content
- 12 years agoc_jones_ismail
- 4 years agokiranka