Commit Graph

17 Commits

Author SHA1 Message Date
Kenneth Shaw
65a198c84e Generic code cleanup
Adding some comments, removing unused items, and renaming handler.go to
target.go to reflect the internal type name changes.
2019-04-03 09:03:41 +02:00
Daniel Martí
661ef78880 don't crash when loading pages with iframes
We broke this in the refactor because of a nil pointer dereference, but
we didn't catch that as none of the tests loaded a page with an iframe.
That is, a page with multiple frames.

Add such a test, and fix the bug by creating an almost-empty frame when
we start receiving events about a new frame before it's navigated to.
2019-04-01 12:18:16 +01:00
Daniel Martí
61f0a8da68 make some linters a bit happier 2019-04-01 12:18:16 +01:00
Daniel Martí
3d3bf22ccc start the chromedp v2 refactor
First, we want all of the functionality in a single package; this means
collapsing whatever is useful into the root chromedp package.

The runner package is being replaced by the Allocator interface, with a
default implementation which starts browser processes.

The client package doesn't really have a place in the new design. The
context, allocator, and browser types will handle the connection with
each browser.

Finally, the new API is context-based, hence the addition of context.go.
The tests have been modified to build and run against the new API.
2019-04-01 12:17:28 +01:00
Kenneth Shaw
b0c2445e67 Splitting repositories 2017-12-28 11:17:14 +07:00
Kenneth Shaw
1a35cceeae Adding OuterHTML and InnerHTML actions 2017-07-01 11:53:22 +07:00
Kenneth Shaw
869aafc836 Adding script to generate domains from protocol.json and updating to latest protocol.json 2017-05-06 08:20:24 +07:00
Kenneth Shaw
bf1d5ecfbc Revising ScrollIntoView Action
- Rewrote ScrollIntoView to be consistent with other query actions
2017-02-28 08:35:00 +07:00
Randy Cahyana
f85f3777fa Fixing issue when node is offscreen and more.
- Adding ScrollIntoNode action.
- Adding isOnViewJS snippet.
- Fixing race issue in some unit tests.
2017-02-27 19:17:36 +07:00
Kenneth Shaw
4c16faa34d Minor code cleanup/maintenance on generated cdp protocol 2017-02-18 15:36:24 +07:00
Kenneth Shaw
ab80f4c5bc Fixing race issues on nodes 2017-02-18 14:28:43 +07:00
Kenneth Shaw
b5032069e3 Fixing race issues
- Refactored chromedp-gen and cdp code so that Execute no longer returns
  a channel
- Fixing potential race problems in handler
- Eliminated some dead code
- Updated examples to include new logging parameters
2017-02-14 17:15:53 +07:00
Kenneth Shaw
3673164aef Code cleanup
- Refactored API calls to be cleaner
- Changed types that shoudn't be exported to not-exported
- Updated examples with API changes
- Added unit test for Title action
2017-02-12 14:08:40 +07:00
Kenneth Shaw
f73c429109 Renaming FrameHandler, updating to latest protocol.json, and code fixes 2017-02-12 12:50:46 +07:00
Kenneth Shaw
6769aefc5e Fixing Visible/NotVisible issues; adding new actions
- Fixed issues with ElementVisible/ElementNotVisible
- Added a few extra Javascript based actions
2017-02-08 23:01:35 +07:00
Kenneth Shaw
58283934b9 Fixing issues with code generation 2017-01-26 14:28:34 +07:00
Kenneth Shaw
20d575fece Initial import 2017-01-24 22:09:23 +07:00