Page 2 of 2

Re: CEF Application automation

Posted: Tue Feb 21, 2017 4:06 pm
by Support Team
Hi Kelly,

by default Ranorex tries to connect to the port 8081. Alternatively, you could set up the debugging port to 8082 in the application under test. Those ports are automatically detected by Ranorex. At the moment, there's no way to configure a different port for accessing CEF applications.

Sincerely,
Johannes

Re: CEF Application automation

Posted: Tue Feb 21, 2017 4:52 pm
by krstcs
We do not use either of those two ports for our debugging port, and we have no way to change it currently. We have other services on those ports.

Why does Ranorex not give us the option on which port to use? This isn't a standard port mapping. 8081 is used for HTTP alternate traffic.

The test tool should not dictate to the SUT which ports it opens, the test tool should be told with port to look at. This seems to be a flaw in the design of Ranorex.

Re: CEF Application automation

Posted: Tue Feb 21, 2017 6:53 pm
by krstcs
In addition to the above, if you look at Google's CEF page, they recommend port 9222 for use with debugging (which is what we are using) because it does not have any other standard uses.

The problem we have is that we must use JNLP to start the SUT, which means that the port cannot be set at run-time. The debug option is set in code, based on the environment that the SUT is started in.

Re: CEF Application automation

Posted: Thu Feb 23, 2017 8:12 am
by Support Team
Hi Kelly,

Sorry, the information that I provided in my previous post was not completely correct. Ranorex detects the port automatically, but the functionality is not limited to the above-mentioned ports.

Basically, Ranorex tries to detect the port in the following sequence:
  • Ranorex checks if the debugging port was set via a command line argument. If the CEF application was started with the corresponding argument, Ranorex tries to access this port
  • Ranorex checks the port 8081
  • After that, Ranorex checks the TCP table and tries to connect to the corresponding port
In order the port detection will work, it must be ensured that the remote debugging port is not used by another application.

If it still doesn't work for jxBrowser, please add an entry to the Ranorex Uservoice. Then, we will check if we can support this CEF framework.

Thank you for your understanding.

Sincerely,
Johannes

Re: CEF Application automation

Posted: Thu Feb 23, 2017 2:51 pm
by krstcs
OK, that makes more sense to me know.

I'll try it again when I get a chance.


Thanks Johannes!

Re: CEF Application automation

Posted: Tue May 09, 2017 9:59 pm
by krstcs
Apologies for the delay.

It appears that Ranorex does not search for ports other than the default 8081 as there is no attempt made to connect to 9222 when Spy or Studio start, when I monitor the ports. I can see that our jxBrowser is, in fact, opening 9222 and listening there, but no connections are made.

However, since I can't even get Ranorex to attempt to connect to 9222, there's no way to know for sure if Ranorex will even work with jxBrowser, which is just a Java wrapper around CEF itself and exposes all of the default interfaces of CEF.

I'm trying to add a request in UserVoice, but it won't let me. Says I'm not authorized, OAuth is broken, etc.

Re: CEF Application automation

Posted: Thu May 11, 2017 7:40 am
by Support Team
Hi Kelly,

We checked our user database, but everything seems to work as expected. We assume that this was only a temporary issue. Please try again to add your feature request in UserVoice.

If you still experience issues, please let us know the exact error message. As a workaround you could also send your feature request by email and we will post this feature on our web page.

Kind regards,
Johannes

Re: CEF Application automation

Posted: Thu May 11, 2017 3:42 pm
by krstcs
Thanks Johannes, I'll give it a try again.

Re: CEF Application automation

Posted: Mon Sep 18, 2017 10:14 am
by David Zita
Hi,
I have the exactly same problem. We have a JxBrowser integrated in our desktop app so I need to be able to test it automatically. I can set the debugging port freely, so I tried to set it to 8081. Now, how do I know Ranorex tries (and possibly fails) to connect to it? I am trying to track it using Spy, but all I see is one big element (similar result as if I try it in Chrome without the Ranorex extension). What should I do to check that Ranorex can or can't work with our JxBrowser application? Thanks.

Re: CEF Application automation

Posted: Tue Sep 19, 2017 10:36 am
by Support Team
Hi David,

As already reviously mentioned I'm afraid that JxBrowser is not officially supported at the moment. The officially supported chromium-based frameworks can be found on our web page.

There's an existing idea on our Ranorex User Voice Platform: Add support for jxBrowser

I would suggest voting for this idea. The more users vote for this feature, the more likely it will be considered for implementation.

An easy way to check if the debugging port was configured correctly would be trying to access the corresponding URL in Chrome:
  • Open Chrome
  • Navigate to http://localhost:8081/
  • Verify if you are able to inspect the content of the CEF application
I hope this information will help you.

Sincerely,
Johannes

Re: CEF Application automation

Posted: Fri Sep 22, 2017 7:26 am
by David Zita
Update on my situation:
SPOILER ALERT - SUCCESS! (sort of)

So, I have followed the instruction from Support Team, on the address http://localhost:8081/ I can see and inspect my jxBrowser application. The next step was the fulfilling of the step 3 in this guide https://jxbrowser.support.teamdev.com/s ... r-selenium. I spent over a day debugging and looking into the source code of the selenium standalone server to find out in the end, that I can set the desired capabilities from the Ranorex itself :roll: To do so, select the WebDriver endpoint in Ranorex, Add/Edit configuration and paste this to the Capabilities JSON:

Code: Select all

{
  "platform": "Windows 10",
  "browserName": "chrome",
  "goog:chromeOptions": {
    "debuggerAddress": "localhost:9222"
  }
}
Now, if you try to access any DOM object, it won't work yet (at least for my app). I need to first invoke OpenBrowser (with Maximize=false otherwise I get an expception). After that the DOM object is accessible, I can even see the content in the Spy. But this OpenBrowser call is undesirable, because
1) you need to know the URL to navigate to
2) the content of the jxBrowser window gets refreshed.
So here I need you help, Support Team ;) What exactly is done in the OpenBrowser method or why is the DOM accessible only after calling that? And how can I workaround it? Thanks

Hope this will help others as well. Cheers

Re: CEF Application automation

Posted: Mon Sep 25, 2017 2:52 pm
by Support Team
Hi David,

Thank you for this update.

I built a JxBrowser sample application and was able to reproduce this issue when accessing the application via the Selenium Webdriver. Basically, the 'Open Browser' action is needed in order to establish the connection to the endpoint. But, there's an option in the plugin settings of Ranorex Studio, which allows to attach to open sessions ("Attach to open sessions"). I'm afraid this setting didn't make any difference in this specific case. I added this as an issue to our internal bug tracking system and we need to analyse in detail how we could support JxBrowser in the future. Currently, we do not know when this issue will be fixed. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.

In the meantime, the only workaround is to run the Open Browser action in order to establish the connection beforehand. You could also run StartBrowser from Ranorex Spy or the endpoint directly.
start_browser_spy.png
start_browser_endpoint.png
I hope this information will help you.

Sincerely,
Johannes

Re: CEF Application automation

Posted: Tue Sep 26, 2017 2:00 pm
by David Zita
Thanks Johannes, I hope it will be solved in the future.