Fails to set attribute on one item.

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 161
Joined: Fri Nov 08, 2019 3:23 pm

Fails to set attribute on one item.

Post by dmconsulting1 » Tue Jun 16, 2020 5:36 pm

Here is the error message:

Setting attribute 'AccessibleValue' failed on element '{Row:PowerControlEnabled}'.
One of the identified items was in an invalid format.
Show/Hide Stacktrace
at Ranorex.Core.Element.SetAttributeValue(String name, Object value)at P38.Modules.Recipe_Functions.SetupTool.Ranorex.Core.Testing.ITestModule.Run() in C:\Work\Temp\P38.Ranorex\P38\Modules\Recipe Functions\SetupTool.cs:line 382at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)

I want to set the accessible value to False. Not sure why it has an issue with this one item in the UI. I attached a snapshot.

Here's the offending line item. It's actually a combobox, but it doesn't act like one. It's one of the great UI elements I get to work with on this project.

(763.52 KiB) Downloaded 127 times
powerControlEnabled.png (15.98 KiB) Viewed 941 times

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

Re: Fails to set attribute on one item.

Post by odklizec » Tue Jun 16, 2020 8:19 pm


Apparently, Ranorex is not able to identify individual cells in this particular table. Just rows. And it's probably not enough to set its value? Additionally, SetValue is not 100% reliable solution when it comes to setting UI.

Have you tried another way of setting value to this particular row/element? For example, elements which act like combo box, can be often set by double click. What happens if you double click this row? Eventually, try to select the row (by mouse click) and then use spacebar or tab key to switch from true to false and vice versa. Anyway, using mouse action or keyboard shortcut is more appropriate way of setting UI than SetValue action, which often does not trigger mouse/keyboard related events.
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

Posts: 161
Joined: Fri Nov 08, 2019 3:23 pm

Re: Fails to set attribute on one item.

Post by dmconsulting1 » Thu Jun 18, 2020 5:32 pm

So currently I am clicking on the down arrow and selecting the item I want. What is interesting is the fact that Via Type, Processing Mode, Beam Positioner Mode and Accele Drill Type all work with SetValue and all are the same funky dropdown to select. Funky in that they don't appear as dropdowns unless you click on them.

The initial script was selecting the dropdown for each item, but then you have click on row, click on dropdown, click on item vs SetValue X. Granted, the first is a better representation of user action, but I am just trying to config my tooling parameters so I can run additional tests.

I just wanted o make sure it wasn't something stupid I was doing. :lol: