How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
User avatar
_KK_
Posts: 36
Joined: Tue Nov 21, 2017 12:51 pm

How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by _KK_ » Mon Nov 05, 2018 10:15 am

Hello Forum,

after integration of stuff regarding "cefSharp" (based on Chromium Browser) we get during test excecution the below detailed described exception.

How to solve this?

Rx: 8.3.0
WPF application


Thanks in advance for a solution.

Regards

Klaus



----------- snippet from Rx logfile ------
2018-11-05 04:51:24.729| INFO|Ranorex.Plugin.CefUtil|start CEF injection into process 'Basereport', pid 7408, host-flavor: wpf, hwnd: 263132

2018-11-05 04:51:25.580|DEBUG|Ranorex.Report|Plugins: LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute. Setting attribute 'Width' failed on element '{Container:CefBrowser}'. Failed to set property 'width' on RemoteObject 'WpfHandle{83f70ed8-b24c-4022-ba2b-ee1aab09861e}'. Unexpected exception during operation. '-1' is not a valid value for property 'Width'.

2018-11-05 04:51:25.580| INFO|Ranorex.Report|LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute. Ranorex.SetAttributeFailedException: Setting attribute 'Width' failed on element '{Container:CefBrowser}'. ---> Ranorex.RanorexException: Failed to set property 'width' on RemoteObject 'WpfHandle{83f70ed8-b24c-4022-ba2b-ee1aab09861e}'. ---> Ranorex.Plugin.Wpf.WpfRemotingException: Unexpected exception during operation. ---> System.ArgumentException: '-1' is not a valid value for property 'Width'.
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)

------------------------------- end of snippet ------------------------------

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

Re: How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by odklizec » Mon Nov 05, 2018 10:39 am

Hi,

Just in case, have you read this user guide chapter regarding testing CEF apps? Please make sure there is enabled remote debugging in your code...
https://www.ranorex.com/help/latest/int ... lications/
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
_KK_
Posts: 36
Joined: Tue Nov 21, 2017 12:51 pm

Re: How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by _KK_ » Tue Nov 06, 2018 6:29 am

Hi Pavel,

thanks for your answer.

Not that I know of, the tests which were running, didn't "touch" CefSharp parts so far.

Who "defines" the rules, which were broken (violated)?
Are the rules for a control or for what parts?

In a dicsussion with the team, I got the information, that there is stuff "under the hood", which is based on CefSharp.
Those parts were not "visited" by tests so far.

Regards

Klaus

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

Re: How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by odklizec » Tue Nov 06, 2018 8:42 am

Hi,

I think it does not matter that the test didn't touch the CEF part at a time of error. It seems that Ranorex is simply unable to instrument/inject the browser with some wpf-related code? I'm not familiar with this particular LineageGlueRule error. But I would definitely check if there is enabled remote debugging, as mentioned in the user guide. Have you checked it yet?

Another thing you might try is to disable the Instrument option in OpenBrowser action...
Instrument_False.png
And make sure the browser is already instrumented (via Ranorex instrumentation wizard). I'm afraid, I'm unfamiliar with Chromium and CefSharp, so I'm not quite sure if the instrumentation part does apply here? But it's worth a try.
You do not have the required permissions to view the files attached to this post.
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
_KK_
Posts: 36
Joined: Tue Nov 21, 2017 12:51 pm

Re: How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by _KK_ » Tue Nov 13, 2018 1:11 pm

The AUT has now gotten the remote Debugging port.

The port is listening on 8081.

The application itselft (the AUT) has a cefBrowser "integrated". It is based on CefSharp. The cef libs reside in the AUT.

I guess something is missing inside the AUT which (should) come from Ranorex.

When I take a Chromium Browser (e.g. from a stick) and load the localhost:8081 it gets an Output as html "Inspectable WebContent".

Do I spy now with Rannorex it tells that there is a Chrome Limitation (means Rx Extension is missing).
Entering the Instrumentation wizard and running it, I am told that I have to restart the chromimum.
Same Situation when respying.

Any help pages available or any ideas?

Best regards

Klaus

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

Re: How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by odklizec » Tue Nov 13, 2018 1:25 pm

Hi,

Sadly, I'm out of ideas. I would suggest you to create a support ticket (here) and ask them for help. Let's hope they will be able to help you with this?
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
_KK_
Posts: 36
Joined: Tue Nov 21, 2017 12:51 pm

Re: How to solve "LineageGlueRule 'cef_wpf_rule' caused SetAttributeFailedException on Execute"?

Post by _KK_ » Tue Nov 13, 2018 1:40 pm

Thank you very much.

I will do so.