Forum Discussion
Isn't CEF-based all lumped into the same support?
...and I don't see anything in that list specific to Electron or CEF, but Electron is supported.
The question was more on how TestComplete knows which port the DevTools are running on...
- AlexKaras2 years ago
Champion Level 2
Hi,
> how TestComplete knows which port the DevTools are running on...
It is my understanding that TestComplete has no idea about DevTools. It can connect to CEF page via CDP (which is a protocol), but cannot do something via DevTools.
> Isn't CEF-based all lumped into the same support?
No... Definitely not.
CEF support is well described in the https://support.smartbear.com/testcomplete/docs/app-testing/web/cef/about.html help article which I really recommend to carefully read for details.
A lot of depends on the version of TestComplete and the tested application - whether it is WPF-based or not and what version of CEF is used.
The fact that CEF page can be connected to via DevTools from remote regular web browser says nothing. Page can be connected to from DevTools, but I do not know whether it can be controlled from there (I mean, say, whether button can be kind of clicked from DevTools and how to wait for the click result).
Past week we lost CEF support for some application that I am assisting with test automation. The reason was because Development updated CEF to one of the latest version and the application itself is exactly WPF-based. And for this case only pretty old CEF version is supported as per referenced help article. So the current state with this application is pretty much like yours: CEF page can be connected to via DevTools from remote web browser but TestComplete cannot access CEF web page (the leaf object in the Object Browser is CEFBrowser itself) and I really not sure whether something can be done in the current situation.
- ericzimmerman2 years agoOccasional Contributor
Thank-you for the feedback.
From the reading that I've done, it seemed like the DevTools page uses the protocol, so I assumed one meant the other.
The questions are now:
1. How do I know that the CDP is running / accessible?
2. How does TestComplete know which port to access CDP?
We will likely need to escalate this to Smartbear.
- AlexKaras2 years ago
Champion Level 2
Hi,
> We will likely need to escalate this to Smartbear.
This is definitely a good idea and I will appreciate it if you update this thread with their reply. Use https://support.smartbear.com/testcomplete/message/ form to create Support ticket.
> it seemed like the DevTools page uses the protocol, so I assumed one meant the other.
I am not sure. My personal understanding is that CDP is just a communication protocol (with the Chromium engine). DevTools uses CDP to talk to browser, but implements additional functionality on top of raw data provided by the engine via CDP. Just like Selenium, for example. Selenium library communicates with the code injected into web page via its protocol, but provides additional functionality via its object model.
> How does TestComplete know which port to access CDP?
Based on the referenced help topic I understand it this way:
-- You must specify the --remote-debugging-port=<port_number> parameter for the applications started using command line. I believe that TestComplete parses command line of the tested application when connects to it (to the application) and thus obtains port number;
-- You must specify the -cdpAutoSetPort command-line parameter for applications started as TestedApps from TestComplete. Again, I believe that in this case TestComplete also has access to all required information.
> How do I know that the CDP is running / accessible?
Not sure I got the question. If you like to ensure that CDP is accessible to TestComplete, you, probably, need to go through CDP documentation.
If you like to know whether TestComplete works with your tested application using CDP or via legacy script injection, then you should check your tested application type (WPF-based or not) and how it was started according to the information provided in the referenced help article.