Daniel Martí 98d4b0de6e pool: error quickly if we find a port in use
Before the fix, the added test would give a Pool.Allocate error like:

	pool could not connect to 9000: timeout waiting for initial target

The actual underlying error, which can only be seen if one inspects
chrome's stderr, is that it failed to bind to the debugging protocol
port if it was already in use.

This is of course an issue with the environment that chromedp is being
run under, since it was given a port range that wasn't available.
However, the confusing error can lead to developers wasting their time
instead of spotting the error quickly.

Unfortunately, there doesn't seem to be a way to have Chrome exit
immediately if it can't bind to the given port. So, instead of relying
on it, check if the current process can bind to the port first.

Add a test too, where we grab the first port in the pool range, and
check that we get an error that's not confusing.

Fixes #253.
2018-12-01 11:54:16 +00:00
2018-07-13 12:46:30 +07:00
2017-12-28 11:17:14 +07:00
2018-07-10 19:51:58 +07:00
2018-07-18 06:19:22 +07:00
2018-05-26 14:05:58 +07:00
2017-12-28 11:17:14 +07:00
2018-05-19 05:06:19 +07:00
2018-07-13 12:46:30 +07:00
2018-05-19 05:06:19 +07:00
2018-05-19 05:06:19 +07:00
2018-07-13 12:49:42 +07:00
2018-07-13 12:49:42 +07:00
2018-07-13 12:46:30 +07:00
2017-12-28 11:17:14 +07:00
2018-05-19 05:06:19 +07:00
2017-12-28 11:17:14 +07:00
2018-03-27 04:31:09 +07:00
2018-03-27 04:31:09 +07:00
2017-12-28 11:17:14 +07:00
2018-05-19 05:06:19 +07:00
2018-03-27 04:31:09 +07:00
2018-07-13 12:46:30 +07:00
2018-03-27 04:31:09 +07:00
2017-12-28 11:17:14 +07:00
2017-12-28 11:17:14 +07:00

About chromedp Build Status Coverage Status

Package chromedp is a faster, simpler way to drive browsers supporting the Chrome DevTools Protocol in Go using the without external dependencies (ie, Selenium, PhantomJS, etc).

Installing

Install in the usual Go way:

go get -u github.com/chromedp/chromedp

Examples

Please see the examples project for more examples. Please refer to the GoDoc API listing for a summary of the API and Actions.

Resources

TODO

  • Move timeouts to context (defaults)
  • Implement more query selector options (allow over riding context timeouts)
  • Contextual actions for "dry run" (or via an accumulator?)
  • Network loader / manager
  • Profiler
Description
No description provided
Readme 2 MiB
Languages
Go 100%