Comments (5)
I see a few issues here:
-
If one batch of parallel testing exits earlier than the rest I think it will trigger quit on the driver which in turn kill browser because it won't be aware of the rest batches. This will mess up the rest of the tests. If it won't kill the browser after ruby exits the browser would be left in memory which is not good too.
-
The protocol supports multi-client debugging for tabs but in order to manipulate the browser itself users have to connect to a dedicated url which is generated when browser starts, chrome spits it to stdout for example
DevTools listening on ws://127.0.0.1:31337/devtools/browser/93806b13-fce0-43c0-bd46-23922bb7c592
with this url and protocol we can create pages and manipulate them. There are also websockets for each page. We can connect tohttp://127.0.0.1:31337/json
but it only shows urls for pages for examplews://127.0.0.1:31337/devtools/page/FAB21C8A5AE08589AD81B13BCB7CB460
not the browser url.
So even if host and port are static we still have to somehow start a few capybara sessions parse address from one of them save it somewhere (filesystem?) so the others could read it and connect to the same browser.
With all that +1s on start seems not that bad to me :)
from cuprite.
@ianks I'm gonna close it for now, feel free to share your thoughts with us if I'm wrong I might have missed something.
from cuprite.
@route Sorry for the delay, busy week. Thanks for taking the time to respond in detail 😄
I see a few issues here:
- If one batch of parallel testing exits earlier than the rest I think it will trigger quit on the driver which in turn kill browser because it won't be aware of the rest batches. This will mess up the rest of the tests. If it won't kill the browser after ruby exits the browser would be left in memory which is not good too.
Yes you are right. However, in this case the leader node should be responsible for maintaining the browse state, rather than each individual test worker. I would require some decoupling of Browser <-> Process (https://github.com/machinio/cuprite/blob/master/lib/capybara/cuprite/browser.rb#L246) but I think it's doable.
- The protocol supports multi-client debugging for tabs but in order to manipulate the browser itself users have to connect to a dedicated url which is generated when browser starts, chrome spits it to stdout for example
DevTools listening on ws://127.0.0.1:31337/devtools/browser/93806b13-fce0-43c0-bd46-23922bb7c592
with this url and protocol we can create pages and manipulate them. There are also websockets for each page. We can connect tohttp://127.0.0.1:31337/json
but it only shows urls for pages for examplews://127.0.0.1:31337/devtools/page/FAB21C8A5AE08589AD81B13BCB7CB460
not the browser url.
So even if host and port are static we still have to somehow start a few capybara sessions parse address from one of them save it somewhere (filesystem?) so the others could read it and connect to the same browser.
Yes, good point. I think the leader<->worker architecture could solve this as well, since it could manage and provide the necessary connection details to the workers.
Thoughts?
from cuprite.
Sounds good with this architecture, do you want to take a stab?
from cuprite.
Check #92
from cuprite.
Related Issues (20)
- Requires `Capybara.save_path` to be absolute_path, unclear error message. HOT 1
- How to configure cuprite to test on mobile emulation ? HOT 3
- ReferenceError: _cuprite is not defined HOT 7
- Cuprite.scrollIntoViewport does not properly handle elements hidden by overlays HOT 1
- How to use Cuprite with a remote browser (browserless/chrome) HOT 1
- BUG: select actions does not trigger "input" events (only "change" event) on select inputs/dropdowns
- Proxy does not get set
- How do I debug the behavior of this gem?
- Cuprite does not appear to support `evaluate_script` HOT 1
- Setting a color input doesn't fire the change or input events
- Process forking causing cuprite/ferrum to never exit HOT 1
- 500 error, possibly related to web sockets with Ferrum
- Race condition leading to `Argument should belong to the same JavaScript world as target object` HOT 2
- What the best way to play with multiple/new windows or tabs? HOT 1
- fill_in with empty string does not call addEventListener('input') HOT 1
- Visibility issue upon replacing hidden nodes (Race condition)
- keydown event sent without key property HOT 5
- Obsolete nodes are not refreshed when using Capybara's #within and/or #synchronize HOT 2
- Release that references ferrum 0.14.0
- Scraping Blocked on Indeed Site HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuprite.