Error using repository element as Webdocument

Ask general questions here.
marlonc
Posts: 6
Joined: Mon Apr 03, 2017 12:29 am

Error using repository element as Webdocument

Post by marlonc » Wed Apr 12, 2017 12:09 am

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.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Error using repository element as Webdocument

Post by krstcs » Wed Apr 12, 2017 2:29 pm

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.
Shortcuts usually aren't...

marlonc
Posts: 6
Joined: Mon Apr 03, 2017 12:29 am

Re: Error using repository element as Webdocument

Post by marlonc » Wed Apr 19, 2017 8:25 pm

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.