Ask a Question

Issues Testing an AJAX-base Web Application

lichtmannls
New Contributor

Issues Testing an AJAX-base Web Application

I've just started attempting to use TestComplete 7.52 to test an elaborate AJAX-based web application, and I've encountered some problems relating to keystroke capture and text entry in test playback.   Most of the text entry in the application is into text boxes in HTML table cells.  The test recorder captures such text entry as setting the text of the box as an empty string -- the actual key presses are missed.  Furthermore, if I manually edit the Text [Set] operation to contain the appropriate text, I get warnings during test playback of the form "The text specified in the edit box has been truncated, since it was too long.", with amplifying remarks of "The editor cannot contain more than 0 symbols. The text ... has been truncated to ''."  Can someone explain to me what the problem is?
7 REPLIES 7


Hi Lawrence,





This warning should be displayed if a text box's maximum length is less than that of the text you are trying to enter into it. Since you are working with a web application, the length of a text box is set via the control's 'maxLength' attribute. Please look at the HTML code of the problematic text box (the value of the 'outerHTML' property) and check whether the 'maxLength' attribute is set for it.





If this is not the case, please provide us with access to the tested page and send us the test code that demonstrates the problem. You can contact us via the Contact Support form. If you cannot provide us with access to your application, please send me or post here the problematic text box's 'outerHTML' property value along with the code generating the warning message.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
lichtmannls
New Contributor

Unfortunately, it will be impossible to provide direct access to the application.  The value of outerHTML for one specific offending text box is:



<INPUT style="BACKGROUND-COLOR: #ffffff; VISIBILITY: visible" class=assets-form-combo-medium maxLength=40>



or, after typing in manually the text which the TestComplete recording fails to capture:



<INPUT style="BACKGROUND-COLOR: #ffffff; VISIBILITY: visible" class=assets-form-combo-medium value=MICROWAVE maxLength=40>



Converting a recorded keyword test to script:



function Test9()

{

  TestedApps.iexplore.Run(1, true);

  Aliases.iexplore1.ToURL("http://192.168.1.222/");

  Aliases.iexplore.pageLogin.tableLogin.cell.panelLogindiv.table.cell.table.cell.textboxLoginlogin.Click(31, 16);

  Aliases.iexplore.pageLogin.tableLogin.cell.panelLogindiv.table.cell.table.cell.textboxLoginlogin.Text = "LLICHTMANN";

  Aliases.iexplore.pageLogin.tableLogin.cell.panelLogindiv.table.cell1.passwordboxLoginpsswd.Text = "xxxx";

  Aliases.iexplore.pageLogin.tableLogin.cell.panelLogindiv.table1.cell.buttonLoginsubmit.Click();

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelLayoutContent.panel.panel.panelJobs2Content.panelJobsTabbar.panelLayoutTabBar.panelLayoutTabs.textnodeMytabs1Item7BoxText.Click(0, 8);

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelLayoutContent.panel.panel.panelJobs2Content.panelLayoutContent.panel.panel.panel.panelAssets2Navigator.table.cell.table.cell.imageFindasset.Click(14, 17);

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.Wait();

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelJfsyDialog36.table.cell.table.cell.table.cell.textboxAssetsFormComboMedium.Click(73, 8);

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelJfsyDialog36.table.cell.table.cell.table.cell.textboxAssetsFormComboMedium.Click(44, 9);

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelJfsyDialog36.table.cell.table.cell.table.cell.textboxAssetsFormComboMedium.Text = "";

  Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelJfsyDialog36.table.cell.table.cell1.table.cell.panel.textnodeAw213BoxText.Click(14, 8);

}



Manually correcting the text setting step to:



Aliases.iexplore2.pageMetbenchCalibrationManagemen.panelJfsyDialog36.table.cell.table.cell.table.cell.textboxAssetsFormComboMedium.Text
= "MICROWAVE";



and running the test results in the following Warning:



<The editor cannot contain more than 0 symbols.

The text 'MICROWAVE' has been truncated to ''.



Sys.Process("iexplore", 3).Page("http://192.168.1.222/private/mcms/start.php?width=1812").Panel("JFSY_dialog_36").Table(0).Cell(1, 0).Table(0).Cell(3, 0).Table(0).Cell(1, 5).Textbox(0)>



Note that in spite of the maxLength setting of 40, TestComplete is unable to record or set a non-empty string in the text box.


Hi Lawrence,





In this case, could you please save your web page to an MHT file and send it to us via the Contact Support form? We will try to recreate the problem with this page.





Also, please let me know the exact version of Internet Explorer you have (Help | About Internet Explorer).
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
lichtmannls
New Contributor

The browser version is Internet Explorer 8.0.6001.18702. 



I'm having difficulty saving the page since it's currently brought up in a menu-less window.  Also, I'll have to get permission to send the page since it contains all the application code -- the page is normally available only to authorized users.  In the meantime, I'll see if I can't recreate the issue on a standalone page put together simply to illustrate the problem.



Thanks for your attention.


Hi Lawrence,





We are ready to sign an NDA if this can help us investigate this problem. Please contact us via the Contact Support form so we can discuss this.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
lichtmannls
New Contributor

I've constructed a simple test case that illustrates the issue -- which seems to be connected with static input elements vs. ones constructed via JavaScript -- and submitted it via the "Contact Support" form.



Thank you.


Hi Lawrence,





Ok, thank you for the sample. We will look into it, and I will contact you as soon as we have any results.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: