Does not match the specific value (foreground/background)

Ask general questions here.
bk_tester
Posts: 26
Joined: Thu Dec 29, 2016 5:37 pm

Re: Does not match the specific value (foreground/background)

Post by bk_tester » Fri Jan 20, 2017 12:02 pm

Hi All,

I'm using the latest Ranorex (6.2.0) and looks like that bug with retrieving attribute value from complex JavaFX controls still have some issue.

There is custom checkbox in in my SUT, so Checked attribute doesn't represent control state correctly. In the same time, this control has CheckState attribute. Here is workaround how this attribute can be correctly retrieved:

Code: Select all

checkboxAdapter.Element.GetAttributeValue("CheckState"); // gets correct value
checkboxAdapter.GetAttributeValue<string>("CheckState"); // gets null
Hope this would be helpful for someone.

Regards

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

Re: Does not match the specific value (foreground/background)

Post by odklizec » Fri Jan 20, 2017 12:14 pm

Hi,

Could you please upload a Ranorex snapshot (not screenshot) of the problematic element? Ideally, post a working sample (code), where we can see the issue.
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

bk_tester
Posts: 26
Joined: Thu Dec 29, 2016 5:37 pm

Re: Does not match the specific value (foreground/background)

Post by bk_tester » Fri Jan 20, 2017 12:35 pm

Currently I'm working on PoC using Ranorex. Therefore I am not allowed to post SUT snapshot. If decision makers will approve the automation with Ranorex I will get back to this topic.

Regards

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

Re: Does not match the specific value (foreground/background)

Post by odklizec » Fri Jan 20, 2017 12:44 pm

In this case, you might try to contact Ranorex guys and [email protected] and request a remote session with them, so they can see the issue and suggest a possible way to overcome it. There is unfortunately nothing anyone here can do without more details (and seeing your AUT).
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
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Does not match the specific value (foreground/background)

Post by Support Team » Sat Jan 21, 2017 5:57 pm

I don't think this is a problem in Ranorex, IMHO the code is just using the wrong return type. CheckBox.CheckState does not return a string, but a value of type Checkstate. IMHO the correct code should look like this:
checkboxAdapter.GetAttributeValue<System.Windows.Forms.CheckState>("CheckState");
// or even easier
var value = checkboxAdapter.CheckState;
Regards,
Alex
Ranorex Team
.
Image