Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Add page on e2e testing and browser automation #2336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Sep 25, 2017

Fixes #2295

First draft of this page. @arthurevans @justinfagnani please comment on what else needs to be included.

@ghost
Copy link
Author

ghost commented Oct 2, 2017

@arthurevans

@arthurevans
Copy link

@justin @ChadKillingsworth @ergo @AndreasGalster Does this seem like a helpful starting point? (Tagging the folks who were discussing this issue on Slack.)

@AndreasGalster
Copy link

I tried to get basic WebDriver tests going a while ago, for some reason only Phantom JS worked on my machine, which does fail even the most basic test to check if my app-shell has a specific property set.

I'm guessing it's a good idea to run WebDrvier tests with the new headless Chrome option?

@ghost
Copy link
Author

ghost commented Oct 4, 2017

@AndreasGalster I will ask @justinfagnani to answer that question.

Did you try the process in this doc? If it didn't work, can you say what happened when you tried it? Also you stated PhantomJS worked, but that it failed a very basic test - does this mean you couldn't use PhantomJS either?

@AndreasGalster
Copy link

I just tried to load my page and get a property on my app-shell. Page loads but no property available. Even with waiting. I can do some more tests tonight if it's helpful. So yes, ultimately I wasn't able to run with PhantomJS and I couldn't try the process in the doc.

Unfortunately for reasons unknown to me yet all my other browsers time out (even Chrome, so I wouldn't be able to run headless). I haven't been able to figure out what that issue this, though I'm guessing this is unrelated to overall webcomponents/Polymer testing.

@ghost
Copy link
Author

ghost commented Oct 10, 2017

Thanks for your feedback @AndreasGalster.

I am not sure what the next step is and hoping y'all can help me to work it out. Currently the info I've provided in the proposed document is:

  • Why automated tests won't work with Polymer elements
  • How to make them work with Chad's custom WebDriver code

From reading Andreas' response, the issues he experienced in attempting this task do not seem to be related to Chad's code.

What further info needs to be provided to enable users to conduct automated tests on Polymer elements?

@arthurevans
Copy link

We have a conflict here, and we never did get input from eng. I feel like there's a lot of new stuff going on with Puppeteer etc., so we should maybe hit eng. up and see if we should merge this or do something larger for 3.x. Or both.

@ghost
Copy link
Author

ghost commented May 2, 2018

note to self: SeleniumHQ/selenium#5762

@43081j
Copy link

43081j commented May 8, 2018

FYI regarding the PR @katejeffreys , it has been merged now.

However, it doesn't introduce an accessor to shadowRoot so the gist from chad is still useful (i may one day get around to adding that but its a laborious PR).

The parts it does fix are things like (C# in my examples here) Element.Text, Element.IsVisible() and other "helper" members. They now traverse shadow dom and follow slots, etc.

Also, you should be using headless chrome for sure. You can use the existing ChromeDriver but with the --headless flag and it will work fine.

We currently use webdriver for all our polymer apps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants