angularjs - Protractor locator can't find html element in phantomjs only -


I have some tests that are working fine in Chrome, but if I switch to phantomjs, :

  Unable to find element with CSS selector. The selectors have a '  

my test just:

  this should be (navigate when clicking' edit ', function () {var editLink = Element (by.css) (element ('selected-recipients one')). Elements (by CSS ('edit preview')); editLink click (); Hopefully (browser.getCurrentUrl ()) .contain ('# / The recipient');});   

This works fine on chrome. Problem is patchwork. I think this problem may have to be done with window size, but it suggests not solving the problem for me. A post found:

I also tried to use by.id by CSS and I have the same problem All other tests in this file are fine and some use. CSS, then it does not look like a problem with the gatekeepers who understand this locator. It seems that the element is not on the page at all.

Any thoughts? Thanks

When phantomjs are acting in a strange way, I dump a screen shot. Maybe what you are looking for, but this is an idea. :)

  page.open ("http://www.stackoverflow.com", function () {page.render ('script_ending.png');}   

Another idea is to try to dump the html in the file, to see that the element exists.

Or try to change the dome, insert an element, then check that Can you find it?

Or to search for the name of the class, to see what it fails ... probably does not contain any child element of the tag.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -