Set value is not working fine when I try to submit it

Ask general questions here.
BS_MR
Posts: 7
Joined: Sun Feb 04, 2018 12:39 pm

Set value is not working fine when I try to submit it

Post by BS_MR » Tue Feb 06, 2018 12:19 pm

Hello guys, I have another question. For some reason, when I try to set the value of a text field, the field is fill up, and if I use the tracking tool after that it seems that the field value is correct as well.

But if then try to post the form, for any reason it seems that is not getting the value of these fields and then having an error on posting. The temporary solution I have found is use the Key Sequence action instead of Set values, and it works fine like that.

So why do you think it can be happening?

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

Re: Set value is not working fine when I try to submit it

Post by odklizec » Tue Feb 06, 2018 1:26 pm

Hi,

The most probable reason of your problem is that the SetValue does not trigger "keypress" (or similar) event. SetValue simply inserts a value to control of your choice, but it does not trigger events/scripts eventually attached to the element! This is why you should use KeySequence instead (especially for web-based apps). SetValue action is not exactly user-based action, so it should be used with caution and only if you know for sure there are no "onkey" or similar events attached to input of your choice.
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

BS_MR
Posts: 7
Joined: Sun Feb 04, 2018 12:39 pm

Re: Set value is not working fine when I try to submit it

Post by BS_MR » Tue Feb 06, 2018 1:49 pm

Ok, I understand. So I will start using only Key Sequence for web forms.

Thank you :)