Page 1 of 1

Error using repository element as Webdocument

Posted: Wed Apr 12, 2017 12:09 am
by marlonc
Here is my code.

Code: Select all

Host.Current.OpenBrowser("http://example.com", "Chrome", "");
var ExampleRepo repo = ExampleRepo.Instance;
repo.ExampleDomain.Self.Navigate("http://google.com");
I am getting these messages:
(1)WARN

Code: Select all

The Chrome debugging interface was either not found or is not enabled. 
Process: 'chrome' (pid 6864)
The following website provides more information on this technology limitation:
http://www.ranorex.com/support/user-guide-20/technology-instrumentation/testing-of-cef-applications.html#remote-debugging-not-available
(This message is only shown once per report.) 
Note: I have Ranorex automation plugin installed on that chrome browser.

(2) ERROR

Code: Select all

Item 'ExampleRepo.ExampleDomain.Self' is no WebDocument.
The element does not support the required capability 'webdocument'.
I am using Ranorex 7.

Question: I can launch chrome with --force-renderer-accessibility to eliminate message 1. But how do I go about message #2. Thanks.

Re: Error using repository element as Webdocument

Posted: Wed Apr 12, 2017 2:29 pm
by krstcs
Remove either "var" or "ExampleRepo" from the line where you declare the repo variable, and try again. You don't both, and it might be causing issues.

Code: Select all

var ExampleRepo repo = ExampleRepo.Instance;
// should be:
ExampleRepo repo = ExampleRepo.Instance;
// or
var repo = ExampleRepo.Instance;
Also, please post a Ranorex Snapshot of the web document so we can see the actual structure, along with the RanoreXPath being used. Without those it will be hard to help.

Re: Error using repository element as Webdocument

Posted: Wed Apr 19, 2017 8:25 pm
by marlonc
My bad, the xpath i use is /form and not /dom that is why Ranorex refuses to treat the browser as webdocument.
Changing it to /dom fixes the issue.
Thanks.