Forum Discussion

Parth's avatar
Parth
New Contributor
2 years ago

How to solve "Incomplete Keyboard Input" warning from the test report summary in Testcomplete?

Hello,
Web Application info: It is one translation service that helps clients Translate documents/texts which is similar to the google text translation feature.
Test complete Project Structure: It's the beginning of  a project, that's why, currently, I have Namemapping, Scenarios, Scripts and Tested Apps. 

 

I am trying to create a script where user can log in to the web portal and translate the text in the text area. I have tried all different ways, but still I am getting an Incomplete Keyboard Input warning in Test Report. 

As per this document https://support.smartbear.com/testcomplete/docs/testing-with/running/handling-errors/incomplete-keyboard-input.html?_ga=2.19038648.106181136.1677506571-607282917.1646513833
Keys should be use for actual keys such as Del, F4 and so on. Somehow, it's working with the Source_text variable, but it's not solving the warning in Test report. I have also used the SetText method, but it's not working for me in this situation. It got me Object not found. Even I am getting the suggestion for SetText method from the Testcomplete suggestion panel (ctrl + shift).

 

 

Script file in Javascript:

const browser = Aliases.browser;
const page = browser.pageAlexaTranslationsAI;
When("user click on the Text button", function () {
Aliases.browser.pageAlexaTranslationsAI.textnodeDocuments.textnodeText.linkText.Click();
});

Then("user should see the source and target text block", function () {
aqObject.CheckProperty(Aliases.browser.pageAlexaTranslationsAI.FindElement("#source_sentence"), "value", cmpEqual, "");
aqObject.CheckProperty(Aliases.browser.pageAlexaTranslationsAI.FindElement("#target_sentence_input"), "value", cmpEqual, "");
OCR.Recognize(Aliases.browser.pageAlexaTranslationsAI.FindElement("(//div)[50]")).CheckText("*XA Text*");
OCR.Recognize(Aliases.browser.pageAlexaTranslationsAI.FindElement("(//div)[50]")).CheckText("*Documents*");
});

Then("user should be to select English as source and French as target lang", function () {
page.textnodeSourceList.textnodeEnglish.linkSourceEng.Click();
page.textnodeTargetList.textnodeFrench.linkTargetFra.Click();
});

Then("the user enters {arg} in the source text block", function (Source_text) {
Aliases.browser.pageAlexaTranslationsAI.FindElement("#source_sentence").Keys(Source_text);

});


Then("the user should see {arg} in the target text block", function (param1) {
aqObject.CheckProperty(Aliases.browser.pageAlexaTranslationsAI.FindElement("#target_sentence"), "contentText", cmpEqual, param1);
});

Then("the user should be able to erase the source text", function () {
browser.pageAlexaTranslationsAI.linkBtnClear.Click();
});

Given("The user is logged in and on the text translation page", function () {
OCR.Recognize(Aliases.browser.pageAlexaTranslationsAI.FindElement("(//div)[50]")).CheckText("*Documents*");
aqObject.CheckProperty(browser.BrowserWindow, "WndCaption", cmpEqual, "Alexa Translations A.I. - [InPrivate] - Microsoft​ Edge");
browser.pageAlexaTranslationsAI.panel.Click();
});

Then("user should be to select French as source and English as target lang", function () {
page.textnodeSourceList.textnodeFrench2.linkSourceFra.Click();
page.textnodeTargetList.textnodeFrench.linkTargetEng.Click();
page.textnode.button.ClickButton();
});

Then("user should be able to select English as source and Spanish as target lang", function (){
page.textnodeSourceIcon.Click();
page.buttonEnglish.ClickButton();
page.textnodeTargetIcon.Click();
page.buttonSpanish.ClickButton();
});

Then("user should be able to select Spanish as source and English as target lang", function (){
page.textnodeSourceIcon.Click();
page.buttonSpanish.ClickButton();
});

Then("user should be able to select English as source and Chinese as target lang", function (){
page.textnodeSourceIcon.Click();
page.buttonEnglish.ClickButton();
page.textnodeTargetIcon.Click();
page.buttonChineseSimplified.ClickButton();
});

Then("user should be able to select Chinese as source and English as target lang", function (){
page.textnodeSourceIcon.Click();
page.buttonChineseSimplified.ClickButton();
});

Then("user should be able to select English as source and Portuguese as target lang", function (){
page.textnodeSourceIcon.Click();
page.buttonEnglish.ClickButton();
page.textnodeTargetIcon.Click();
page.buttonPortuguese.ClickButton();
});

Then("user should be able to select Portuguese as source and English as target lang", function (){
page.textnodeSourceIcon.Click();
page.buttonPortuguese.ClickButton();
});

 

No RepliesBe the first to reply