karma-runner / karma-webdriver-launcher

A plugin for Karma. Launch any browser with WebDriver.
MIT License
66 stars 40 forks source link

Example tests? #2

Closed mlmorg closed 5 years ago

mlmorg commented 11 years ago

Sorry to sound like such a n00b but how does one access the browser object to actually handle the webdriver? It would be great to have an example of how to write a simple test with this!

Thanks

aparkinson commented 11 years ago

I have just publish a blog post on the launcher http://hindsighttesting.com/blog/2013/08/14/Cross-browser-testing-JavaScript/ and a example project is also available https://github.com/hindsightsoftware/karma-webdriver-example

onikiienko commented 9 years ago

I don't find the part about "how does one access the browser object to actually handle the webdriver" in your blog.

geraldyeo commented 9 years ago

+1 Yes, it will be great to know how to get browser in the test suites.

LKay commented 8 years ago

+1 Over a year and still no way to access browser object?!

Fresa commented 8 years ago

I'm not an expert on Karma, but if you are looking for e2e browser automation (i.e. tell the browser what to do within your test) this is not what Karma provides or are built for. You are probably looking for something like Selenium. If I understand it correctly, Karma just executes an html file including your tests and source code using a driver and processes the result. It cannot tell the browser what to do.

I think this thread sums it up pretty good: https://github.com/karma-runner/karma/issues/413