SetValue works locally, but not with Agent

Ask general questions here.
dmconsulting1
Posts: 83
Joined: Fri Nov 08, 2019 3:23 pm

SetValue works locally, but not with Agent

Post by dmconsulting1 » Wed Jan 08, 2020 7:30 pm

I have a step the sets the value of the File Name field to open a file under test. But when I push this test to run on the agent, it fails to set the value.

This is the only test like this I seem to have a problem with, it is very frustrating.

dmconsulting1
Posts: 83
Joined: Fri Nov 08, 2019 3:23 pm

Re: SetValue works locally, but not with Agent

Post by dmconsulting1 » Wed Jan 08, 2020 8:40 pm

Ok, weird.

I am using a variable to set the value with. If I have the variable bound to a parameter, it fails. If the variable is unbound but has a valid value set for default, it works. Is this expected behavior?

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

Re: SetValue works locally, but not with Agent

Post by odklizec » Thu Jan 09, 2020 8:15 am

Hi,

Are you pretty sure that the bound parameter contains correct value?

I seriously doubt that there is a problem with parameter/variable binding, because it's a core Ranorex feature, used in almost every Ranorex solution. So I can't imagine that such issue would not be discovered yet ;) In my opinion, the value in binded parameter is wrong, or the variable is bound to incorrect parameter? Eventually, the value of parameter is overwritten with incorrect one during test run? Could you please share the report file, where we can see the failure and value of binded parameter?
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

dmconsulting1
Posts: 83
Joined: Fri Nov 08, 2019 3:23 pm

Re: SetValue works locally, but not with Agent

Post by dmconsulting1 » Thu Jan 09, 2020 6:20 pm

There isn't an error, it just doesn't.

00:03.567 Info Set value Setting attribute Text to '$backupFileName' on item 'ApplicationUnderTest.FileName'


But nothing gets entered. (expecting the default value).

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

Re: SetValue works locally, but not with Agent

Post by odklizec » Thu Jan 09, 2020 9:54 pm

Hi,

Default variable value is entered, only if the variable is not bound to data connector or parameter. If the variable is bound to data connector or parameter, there is used value from given data connector or parameter, even if the value is not set/empty! Simply put, if the parameter is empty, bound variable will be empty too, regardless of its default value.
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