Page 1 of 1

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

Posted: Mon Nov 05, 2018 10:15 am
by _KK_
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 ------------------------------

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

Posted: Mon Nov 05, 2018 10:39 am
by odklizec
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/

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

Posted: Tue Nov 06, 2018 6:29 am
by _KK_
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

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

Posted: Tue Nov 06, 2018 8:42 am
by odklizec
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.

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

Posted: Tue Nov 13, 2018 1:11 pm
by _KK_
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

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

Posted: Tue Nov 13, 2018 1:25 pm
by odklizec
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?

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

Posted: Tue Nov 13, 2018 1:40 pm
by _KK_
Thank you very much.

I will do so.