scottgonzalez/node-browserstack

Improve readme to include a test.

Closed this issue · 5 comments

tmcw commented

How does one use this code? The readme illustrates how to read browsers, and then we've got a list of functions with no real clear idea as far as the flow of what to what.

Should the readme have an assert for an example? Or is this out of scope?

Why would the readme have an assertion? The full API is documented. How you use the BrowserStack API is up to you. I'm not sure what you're looking for, can you elaborate?

tmcw commented

Er, possibly I'm just not understanding the API. Is this an API just for listing browser versions? Can you use the browsers in some way, like sending them to web pages, or run code?

Right now it leads you to list browsers, and then create a 'worker', and then... you have a worker. What is a worker? Can I do things with it?

No, you can't do anything with it other than terminate it. The API is useful for doing things like running automated tests which report back to some other system.

tmcw commented

The API is useful for doing things like running automated tests which report back to some other system.

Can you write that in the readme? I see now that the createWorker code takes a url. If it's creating-and-running a worker, it might want to be called something like loadUrl or something.

loadUrl() is a confusing name as it doesn't explain what's really happening, which is the creation of a worker. This is basically just a pass-thru mapping to BrowserStack's API.