Random Key Sequence Issue

Best practices, code snippets for common functionality, examples, and guidelines.
User avatar
CMeNot
Posts: 9
Joined: Wed Feb 06, 2019 4:12 pm

Random Key Sequence Issue

Post by CMeNot » Thu Jun 03, 2021 8:23 pm

Hi All, We have many Ranorex test suites, I am running version 9.3.2+git.9da16f76. In multiple suites we use the action "Key sequence". What we saw was sometimes the value used did not display in the entry field. So we added 3 Invoke actions (EnsureVisible() then Focus() then PerformClick()) before using the action Key sequence. That fixed the issue in most cases however I can run the same Test Suite from the same machine multiple times in a row and every once in a while nothing is entered into the entry field and no errors are reported. This is real frustrating as this happens on a machine with very good network responses (10Gbit link) as well as slow machines (VPN using a 20megabyte/sec link). I am a real loss as to why this happens so intermittently. Any idea how to make key sequence stable from run to run?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Random Key Sequence Issue

Post by odklizec » Fri Jun 04, 2021 8:59 am

Hi,

Unfortunately, there is no info about the app under test (web, desktop?). Additionally, you are using a quite old and no longer supported Ranorex version. So please, let us know more about your app and also try to update Ranorex with most recent 9.5.2 (even in trial mode) and try to reproduce the issue.

Usually, this kind of issue is caused by (not-yet) fully loaded UI, where Ranorex already see the element in question, but the element itself (page/form) is not yet fully loaded and there are done some actions in background, which sets or resets the UI, before its fully operational. So, I would suggest, in case of web app, to add WaitForDocumentLoaded action before using KeySequence action. In case of desktop, you may need to add either WaitFor Exists action, or a hardcoded Delays here or there.

Unfortunately, without knowing more about your app under test (ideally, seeing a sample app or web), there is not much more anyone here can do or suggest.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
CMeNot
Posts: 9
Joined: Wed Feb 06, 2019 4:12 pm

Re: Random Key Sequence Issue

Post by CMeNot » Thu Jun 10, 2021 6:45 pm

Thanks for the info. I have requested 9.5.2 and hopefully I will get that soon. This is a web app and so I'll try adding the wait for the document to load.