Testcafe: How does testcafe internally works?

Created on 1 Nov 2016  路  14Comments  路  Source: DevExpress/testcafe

hi!

this library looks great but it is not clear from readme how does it internally works.
Does it use W3C Webdriver Spec commands or if not how it communicates with web pages?
I think it would be useful to add to readme.
Thanks!

Auto-locked question

Most helpful comment

Hi @vitalets,

TestCafe doesn't use WebDriver, but it's based on a URL-rewriting proxy. With the proxy we inject scripts that emulate user actions via DOM API. @inikulin have described in our discussion board what the difference between TestCafe and WebDriver-based solutions.
Feel free to ask us about any further technical details.

All 14 comments

Hi @vitalets,

TestCafe doesn't use WebDriver, but it's based on a URL-rewriting proxy. With the proxy we inject scripts that emulate user actions via DOM API. @inikulin have described in our discussion board what the difference between TestCafe and WebDriver-based solutions.
Feel free to ask us about any further technical details.

@AlexanderMoskovkin Thanks for the link!
Btw, how are dealing with alerts/prompts that block js thread?

Hi @vitalets.

Native dialogs are handled via pre-specified handlers, see: https://devexpress.github.io/testcafe/documentation/test-api/handling-native-dialogs.html

But do you technically do this? You overwrite window.alert and don't actually show dialog but store info that it was called?

@vitalets Correct. For other dialogs that require actions from user (like confirm) we also execute pre-defined handlers to decide how dialog should be handled.

Ok, thanks!
Also what about parallel running of tests? is it possible? Did not fond this in docs..

You mean parallel run in different browsers or parallelize task using different instances of the same browser? If the first one, it's already supported (e.g. testcafe chrome,firefox - will run tests in parallel in Chrome and Firefox). If the second one, it's possible from technical perspective, but we haven't received any requests for this feature yet. So once there will be a demand, we'll implement it.

Ok, thanks for detailed explanation!
I think we can close the issue =)

Does TestCafe support IE?

Yes, TestCafe supports IE11 (Officially supported browsers)

Thank you @miherlosev!!

I have another question, can the test take screenshot of a webpage?

Yes, see Take screenshot documentation topic.

Thanks a lot @miherlosev , some more questions; Can TestCafe integrate with TFS for automated build test, and report test status? How do people debug the script?

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

Was this page helpful?
0 / 5 - 0 ratings