Contributions
- 1.1KViews0likes0Comments
- 927Views0likes0Comments
- 928Views0likes0Comments
textbox assigned empty string after recording - playback fails
Hi. I'm testing logon functions for an ASP.NET web application. I recorded a script to testing the selection and entry of security questions for a new account. User must pick and answer 5 questions, so there's a table with 3 columns and 5 rows. Column one of each row is a drop-down selector with the question. Column two is a textbox for entry of answer. Column three is a button to save the row. On replay, the script does not enter any answer in the answer textbox. How do I make this work? Here's the script: function AF1() { var iexplore; var page; var table; var panel; var textbox; TestedApps.iexplore.Run(); iexplore = Sys.Process("iexplore", 2); iexplore.ToURL("http://qa/External/qa7/Login.aspx"); page = iexplore.Page("http://qa/External/qa7/Login.aspx"); table = page.Panel("WrapDiv").Form("form1").Panel("page").Table("fullContent").Cell(0, 0).Panel("contenthere").Panel("pnlLogin").Table("LoginTbl"); table.Cell(4, 1).Textbox("txtUserName").Text = "ULYGRANT6"; table.Cell(7, 1).PasswordBox("txtPassword").Text = "password"; table.Cell(9, 1).SubmitButton("btnLogIn").Click(); //Please wait until download completes: "http://qa/External/qa7/RequiredInformation.aspx" page.Wait(); Objects.Compare(Sys.Process("iexplore", 2).Page("http://qa/External/qa7/RequiredInformation.aspx").Panel("WrapDiv").Form("form1").Panel("page").Panel("pnlSecurityQs").Table(0), "AF12-a", true); panel = page.Panel("WrapDiv").Form("form1").Panel("page"); table = panel.Panel("pnlSecurityQs").Table(0).Cell(1, 0).Table("SQPanel"); textbox = table.Cell(1, 2).Textbox("SQPanel_SQText_1"); textbox.Click(141, 4); textbox.Text = ""; table.Cell(1, 3).Button("Save").Click(); textbox = table.Cell(2, 2).Textbox("SQPanel_SQText_2"); textbox.Click(172, 11); textbox.Text = ""; table.Cell(2, 3).Button("Save").Click(); textbox = table.Cell(3, 2).Textbox("SQPanel_SQText_3"); textbox.Click(219, 6); textbox.Text = ""; table.Cell(3, 3).Button("Save").Click(); textbox = table.Cell(4, 2).Textbox("SQPanel_SQText_4"); textbox.Click(192, 11); textbox.Text = ""; table.Cell(4, 3).Button("Save").Click(); textbox = table.Cell(5, 2).Textbox("SQPanel_SQText_5"); textbox.Click(143, 16); textbox.Text = ""; table.Cell(5, 3).Button("Save").Click(); Objects.Compare(Sys.Process("iexplore", 2).Page("http://qa/External/qa7/RequiredInformation.aspx").Panel("WrapDiv").Form("form1").Panel("page").Panel("pnlSecurityQs").Table(0).Cell(1, 0), "AF14-a", true); panel.Table(1).Cell(0, 0).SubmitButton("btnSubmit").Click(); //Please wait until download completes: "http://qa/External/qa7/BillSelector.aspx?statementtype=3" page.Wait(); Objects.Compare(Sys.Process("iexplore", 2).Page("http://qa/External/qa7/BillSelector.aspx?statementtype=3").Panel("WrapDiv").Form("aspnetForm").Panel("page").Panel("userinfo"), "AF15-a", true); page.Panel("WrapDiv").Form("aspnetForm").Panel("page").Panel("header").Table(0).Cell(0, 0).Link("LogOutLink").TextNode("ctl00_Label2").Click(25, 5); //Please wait until download completes: "http://qa/External/qa7/Login.aspx?action=out" page.Wait(); Sys.Process("iexplore", 1).IEFrame(0).Close(); } NOTICE that after recording... each answer textbox is assigned to an empty string. I did manually enter the info in the script, but the playback still fails.11KViews0likes3Comments- 1.1KViews0likes0Comments
- 1.1KViews0likes0Comments
Re: TestComplete cannot find objects during execution of recorded web tests
Hey, If you are starting the test application via application defined in "TestedApps", be sure to add "TestedApps.CloseAll()" at the bottom of each script. This solved a lot of my problems with not finding objects. Barb1.4KViews0likes0CommentsPlayback of recorded script does not enter info in text box
Hi. I'm testing logon functions for an ASP.NET web application. I recorded a script to testing the selection and entry of security questions for a new account. User must pick and answer 5 questions, so there's a table with 3 columns and 5 rows. Column one of each row is a drop-down selector with the question. Column two is a textbox for entry of answer. Column three is a button to save the row. On replay, the script does not enter any answer in the answer textbox. How do I make this work? Here's the script: function AF1() { var iexplore; var page; var table; var panel; var textbox; TestedApps.iexplore.Run(); iexplore = Sys.Process("iexplore", 2); iexplore.ToURL("http://qa/External/qa7/Login.aspx"); page = iexplore.Page("http://qa/External/qa7/Login.aspx"); table = page.Panel("WrapDiv").Form("form1").Panel("page").Table("fullContent").Cell(0, 0).Panel("contenthere").Panel("pnlLogin").Table("LoginTbl"); table.Cell(4, 1).Textbox("txtUserName").Text = "ULYGRANT6"; table.Cell(7, 1).PasswordBox("txtPassword").Text = "password"; table.Cell(9, 1).SubmitButton("btnLogIn").Click(); //Please wait until download completes: "http://qa/External/qa7/RequiredInformation.aspx" page.Wait(); Objects.Compare(Sys.Process("iexplore", 2).Page("http://qa/External/qa7/RequiredInformation.aspx").Panel("WrapDiv").Form("form1").Panel("page").Panel("pnlSecurityQs").Table(0), "AF12-a", true); panel = page.Panel("WrapDiv").Form("form1").Panel("page"); table = panel.Panel("pnlSecurityQs").Table(0).Cell(1, 0).Table("SQPanel"); textbox = table.Cell(1, 2).Textbox("SQPanel_SQText_1"); textbox.Click(141, 4); textbox.Text = ""; table.Cell(1, 3).Button("Save").Click(); textbox = table.Cell(2, 2).Textbox("SQPanel_SQText_2"); textbox.Click(172, 11); textbox.Text = ""; table.Cell(2, 3).Button("Save").Click(); textbox = table.Cell(3, 2).Textbox("SQPanel_SQText_3"); textbox.Click(219, 6); textbox.Text = ""; table.Cell(3, 3).Button("Save").Click(); textbox = table.Cell(4, 2).Textbox("SQPanel_SQText_4"); textbox.Click(192, 11); textbox.Text = ""; table.Cell(4, 3).Button("Save").Click(); textbox = table.Cell(5, 2).Textbox("SQPanel_SQText_5"); textbox.Click(143, 16); textbox.Text = ""; table.Cell(5, 3).Button("Save").Click(); Objects.Compare(Sys.Process("iexplore", 2).Page("http://qa/External/qa7/RequiredInformation.aspx").Panel("WrapDiv").Form("form1").Panel("page").Panel("pnlSecurityQs").Table(0).Cell(1, 0), "AF14-a", true); panel.Table(1).Cell(0, 0).SubmitButton("btnSubmit").Click(); //Please wait until download completes: "http://qa/External/qa7/BillSelector.aspx?statementtype=3" page.Wait(); Objects.Compare(Sys.Process("iexplore", 2).Page("http://qa/External/qa7/BillSelector.aspx?statementtype=3").Panel("WrapDiv").Form("aspnetForm").Panel("page").Panel("userinfo"), "AF15-a", true); page.Panel("WrapDiv").Form("aspnetForm").Panel("page").Panel("header").Table(0).Cell(0, 0).Link("LogOutLink").TextNode("ctl00_Label2").Click(25, 5); //Please wait until download completes: "http://qa/External/qa7/Login.aspx?action=out" page.Wait(); Sys.Process("iexplore", 1).IEFrame(0).Close(); } NOTICE that after recording... each answer textbox is assigned to an empty string. I did manually enter the info in the script, but the playback still fails.14KViews0likes6CommentsObjects. Compare error--- never mind... has to do w/ uniquely identifying objects....
Playing back a recorded script (js) reported two "Objects. Compare error." warnings on two object checkpoints. I don't understand why. 1st warning: The "Panel(0)" object not found. reported on this line: Objects.Compare(Sys.Process("iexplore", 3).Page("http://qa/Internal/InfoFormReportOutput.aspx?show=xml&runid=32"), "pageHttpQaInternalInfoformreport1", true); 2nd warning: The "Form("form1")" object not found. reported on this line: Objects.Compare(Sys.Process("iexplore", 3).Page("http://qa/Internal/InfoFormReportOutput.aspx?*"), "pageUntitledPage", true); Yet this checkpoint, gets no warning Objects.Compare(Sys.Process("iexplore", 3).Page("http://qa/Internal/InfoFormReportOutput.aspx?show=csv&runid=32"), "pageHttpQaInternalInfoformreport", true); I get the same warning when I use wildcard on the dynamic part of the address in all three checkpoints. Why am I getting the warnings? I don't see any reference to "Panel(0)" in the 1st object checkpoint, nor "Form("form1")" in the second.12KViews0likes1Comment