Getting exception error while setting value to input box

Getting exception error while setting value to input box, I am trying setting value using seleniumlibrary.Input Text keyword. Can you help me how to resolve this exception. Thanks for helping in advance.

Getting error :

UnexpectedAlertPresentException: Alert Text: DataTables warning: table id=WatsonTable - Ajax error. For more information about this error, please see 7. Warning: Ajax error
Message: unexpected alert open: {Alert text : DataTables warning: table id=WatsonTable - Ajax error. For more information about this error, please see 7. Warning: Ajax error}
** (Session info: MicrosoftEdge=120.0.2210.121)**
Stacktrace:
GetHandleVerifier [0x00007FF6A4E4FF82+58194]
Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6A4DDE8E2+216498]
(No symbol) [0x00007FF6A4BF9E1B]
(No symbol) [0x00007FF6A4C89412]
(No symbol) [0x00007FF6A4C6BD43]
(No symbol) [0x00007FF6A4C3C162]
(No symbol) [0x00007FF6A4C3B5BD]
(No symbol) [0x00007FF6A4C3C994]
Microsoft::Applications::Events::EventProperty::to_string [0x00007FF6A500692A+1051354]
(No symbol) [0x00007FF6A4CBF596]
Microsoft::Applications::Events::EventProperty::clear [0x00007FF6A4D56205+34245]
Microsoft::Applications::Events::EventProperty::clear [0x00007FF6A4D4E6AD+2669]
Microsoft::Applications::Events::EventProperty::to_string [0x00007FF6A5005623+1046483]
Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6A4DE85C8+256664]
Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6A4DE3D54+238116]
Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6A4DE3E82+238418]
Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6A4DD8C21+192753]
(No symbol) [0x00007FFF50D653E0]
RtlUserThreadStart [0x00007FFF5190485B+43]

Hi gk,

That error looks to me like an ajax call that failed that was triggered by entering something in the field, so probably an application issue.

A little troubleshooting first

  • do you get the same error on chrome?
  • do you get the same error in dev tools console if you do this step manually?
  • do you get this error entering text into a similar field on another website (different application)?

Hopefully this helps,

Dave.

Thanks for quickly responded Dave

  • do you get the same error on chrome? Yes same error getting on chrome as well
  • do you get the same error in dev tools console if you do this step manually?->No, this is happening through Automation
  • do you get this error entering text into a similar field on another website (different application)? No, able to enter values into text field through Input Text keyword.

Hi gk,

Ok great,

  • we ruled out a browser specific issue.
  • we also likely ruled out it being an issue with the tool

Are you running the manual test on the same machine as the automation?
Are you able to run the automation and the manual test on the same machine?

It still seems like an application issue to me, but now i’m suspecting that the machine(s) running the automation might not have access to the server that the site is making the ajax call to.

Also when you do the steps manually, you enter some text into this text field what happens? does a list of suggestions pop up? is this critical functionality to this test or just a nice to have? - just trying to understand the scope of the issue.

Dave.

Hi,

Would it be possible that the input box has specific behavior, such as selecting options (calendar for example), where using Input text clicks and does not work as in the manual way?
Manually we usually select/highlight the existing value, then replace or empty it before setting new value.

I encountered this where Input text focus on the field, and fills an automatic value due to js script.
Even clear=true doesn’t work, has the keyword emptied, then clicked/refilled with a value.
Only way to set a value was through js : Execute JavaScript document.querySelector(“field”).value = ‘value’;

Maybe a hint.

Regards

1 Like

Thanks for your response

Tried with ‘Selenium2Library.Execute Javascript window.querySelector(’#search_column_0’).value = ‘10755’ even though I am getting same ajax error.

This is search box, when i enter the value into it then give the list of values in web table based on the value. This is working fine in manually .

Ho gk,

FYI - You should be using SeleniumLibrary not Selenium2Library, but this is not your issue

When you do the steps manually with dev tools open you should be able to see the ajax calls that return thw data for the list below you filter fields. Can you check if the server name us the same or different from the page with the filters?

Based on your previous answers, I suspect the problem you are encountering is because they are different and the machine running your robot tests doesn’t have access to that server.

Dave

1 Like

And even if its not different server, if you monitor the network requests during the test execution and during manual passing exception, you should definitely see the difference what your testcase sends to the server vs what is sent to the server when done manually.

This sort of “debugging” is really really really useful to learn when sorting out issues when doing anything (scraping, testing etc) against websites.

1 Like

Thank you Dave & Rasjani for your support.
I found the issue through network requests and got fix from development team. Now am able to feed the value into Text box.

2 Likes