-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests failing in nightmare #7
Comments
Hi, it can be some electron-specific thing. So, it's hard to determine the reason without the example. You can try to investigate it deeply (for example write to console outer html of some elements in the test to see what happens) |
I just cloned the basic example that testcafe provides us with and tried nightmare browser on it. It fails as well on nightmare but works on chrome. How can i see if theres something wrong with my nightmare or what should i do to fix this? THanks. |
What the error do you see? |
Using locally installed version of TestCafe.
A set of examples that illustrate how to use TestCafe API
✓ Pick option from select
2/8 failed (28s) |
And in chrome i got:
A set of examples that illustrate how to use TestCafe API 8 passed (18s) |
Thanks for the clarification. |
Okey thanks for the explanation. |
And in this case (not the same error than before) what could be the problem? On nightmare: Using locally installed version of TestCafe.
Getting Started
div.col-lg-7.col-lg-offset-5.col-md-12.col-sm-12.col-xs-12.claim-advertise-text
1/1 failed (35s) On chrome: Using locally installed version of TestCafe.
Getting Started 1 passed (33s) It is a very simple test with only one assertion i dont understand why nightmare doesn't find the selectors. |
It's too hard to determine the problem without a page example in this case |
Okey then let me show you another example where it happens the same to me in this website "https://www.eltiempo.es/" where i get this in chrome: Using locally installed version of TestCafe.
Getting Started 1 passed (20s) and this in nightmare: Using locally installed version of TestCafe.
Getting Started
1/1 failed (10s) and the test code i'm using is this: import { Selector } from 'testcafe'; fixture test('check for the weather in barcelona', async t => {
}); Thanks you very much. |
Thanks for the example, we'll check it |
Hey, have you been able to check something or find the issue here? Thanks! |
Hi @gerardus1995, I've checked your case. I've tried to run your page with nightmare (without testcafe). By default the page is opened in mobile view, because of the window size: You can reproduce it if you run the test in the Chrome with not big window size. In this case the target input is not visible, therefore testcafe can't click it. So you need to increase window size, for example you can do it via await t.resizeWindow(1600, 800); |
is there any way to set the window size allways to a certain dimesions so i dont have to put that line everywhere? |
For now the only way to set the browser size in your case is using the Meanwhile, Nightmare allows to set the browser size via its constructor options. But it's necessary to add API for this in the plugin. |
Thank you very much! |
This is really cool feature. Like in protractor conf we can specify the window size as chromeOptions args or say in testcafe I can write |
Is there any reason why test that i got already working in chrome when i test it in nightmare i get "The specified selector does not match any element in the DOM tree."?
The text was updated successfully, but these errors were encountered: