Why can't web elements be tracked and says no button

Experiences, small talk, and other automation gossip.
Sanuwar
Posts: 11
Joined: Wed Sep 16, 2020 6:19 pm

Why can't web elements be tracked and says no button

Post by Sanuwar » Wed Apr 14, 2021 8:25 pm

I was working with a simple webpage. However, I could not track the web elements on this page using the track button on .rxrep file. I used ranorex selocity to get rxpath for the web elements. While the login button is tracked, it can't be clicked once I run the test as it says the item is not a button. So my questions are, why I can't track the elements from .rxrep file? And, why the login button is not working. I am attaching the snapshot here.
You do not have the required permissions to view the files attached to this post.

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

Re: Why can't web elements be tracked and says no button

Post by odklizec » Wed Apr 14, 2021 8:35 pm

Hi,

Please provide also xpath for the problematic element. Ideally, post also exact error you getting (entire report or at least screenshot of error).

If the problem is with Login button, it's actually not a button but "Input" element. How does it appear in repository?
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

Sanuwar
Posts: 11
Joined: Wed Sep 16, 2020 6:19 pm

Re: Why can't web elements be tracked and says no button

Post by Sanuwar » Thu Apr 15, 2021 5:30 pm

Hi, Odklizec,
Thanks for your reply. I can't capture the rxpath the web elements from the 'tracking' button of .rxrep file. However, I can inspect (from context menu) each web elements and get their rxpath. For example, rxpath of username box captured by Ranorex solecity is //input[#'UserNameTxt'] rxpath for password box is //input[#'PasswordTxt'] and rxpath for loginButton is //button[#'LoginBtn'].
I experience several problems when the use these rxpath in .rxrep file. For example, it could not find the login button at first. I changed the adapter type from property and since then, login button is being clicked. However, after clicking login button it says password is missing, even though password is being inserted during test run (find the picture attached).
Let's go to the first issue first: Why I can't track individual items in that webpage (Screenshot attached)?
You do not have the required permissions to view the files attached to this post.

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

Re: Why can't web elements be tracked and says no button

Post by odklizec » Thu Apr 15, 2021 6:24 pm

Hi,

First things first...
What happens, if you use Recording functionality? Does it record individual elements and their xpaths?
What happens, if you track the problematic elements with Standalone Spy?
Are you running both Ranorex and Spy in Admin mode? If not, try it please.

As for why the login details are not registered, my guess is that you are using SetValue action? And this may be a problem ;) Use KeySequence action instead. The problem with SetValue action is, that it does not trigger underlying onmouse/onkey events! So if there is such event assigned to the input in question, SetValue will not trigger it. I guess there is some kind of input validation, which is typically performed during typing into input. Therefore, you must use KeySequence action, which simulates 'typing'.
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

Sanuwar
Posts: 11
Joined: Wed Sep 16, 2020 6:19 pm

Re: Why can't web elements be tracked and says no button

Post by Sanuwar » Fri Apr 16, 2021 3:44 pm

Hi, Odklizec,
Thanks. I was able to get rid of second problem using KeyPress command instead of SetAttributeValue. However, the first problem still persists in spite of adopting your recommendations including, usage of recording functionality, standalone spy, and running them in admin mode. This problem is important for me to get rid of as I noticed that not only the log in page but also the elements of the whole app remains undetected in spy tool. Please tell me how should I try next. Thanks.

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

Re: Why can't web elements be tracked and says no button

Post by odklizec » Fri Apr 16, 2021 4:21 pm

Hi,

Well it sounds to me like a problem with Ranorex plugin in Chrome. If Ranroex spy detects Form, instead of DOM element, it's definitely a plugin issue. Please try to uninstall Ranorex plugin (via Ranorex instrumentation wizard), restart Chrome and then install it back. Hope this helps?
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

Sanuwar
Posts: 11
Joined: Wed Sep 16, 2020 6:19 pm

Re: Why can't web elements be tracked and says no button

Post by Sanuwar » Wed Apr 21, 2021 7:12 pm

It's now working. Thanks. However, I am curious to know why the plugin issue was only problematic to that particular webpage. It did not create any problem in testing other web apps.

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

Re: Why can't web elements be tracked and says no button

Post by odklizec » Wed Apr 21, 2021 9:09 pm

Hi,

It's working after you reinstalled the plugin or what? Unfortunately, it's impossible to tell what's the source of problem without seeing your web page and actually trying it. But generally speaking, Chrome plugin acts weirdly from time to time, with no apparent reason. And the solution is (usually) plugin reinstallation ;)
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

Sanuwar
Posts: 11
Joined: Wed Sep 16, 2020 6:19 pm

Re: Why can't web elements be tracked and says no button

Post by Sanuwar » Fri Apr 23, 2021 5:26 pm

Yes, it's working after I had done what you asked me to do. I uninstall the plug in, re-install it. Since then it's working. I was just wondering if there is a causal effect of plugin issue on spy tool's detecting web element, why the effect was not repeated for other web page. Thanks.