webdriverio-boneyard / browserevent Goto Github PK
View Code? Open in Web Editor NEWPlugin for the WebdriverIO project to listen on client side browser events
Home Page: http://webdriver.io
License: MIT License
Plugin for the WebdriverIO project to listen on client side browser events
Home Page: http://webdriver.io
License: MIT License
I found I needed a quit()
method, or similar, to close the HTTP server connection and thus allow the Node thread to close:
this.quit = function() {
this.app.close();
};
Without this, my Node app stays alive indefinitely, even though webdriverio and selenium have been quit.
I am trying to attach an event to window object
browser.addEventListener('onunload', 'window', (e) => { console.log('browser unloaded') console.log(e) })
and I see the below error, I am not sure if this is the right way
Cannot set property 'removeEventListener' of undefined
Is setting an eventListener for window object supported?
When initializing browserevent
with an instance of WebDriverIO 3.2.5, I get this exception:
undefined: Cannot set property 'removeEventListener' of undefined
The code initializing it:
this.browser = webdriverio.remote({
host: "localhost",
port: seleniumPort,
desiredCapabilities: { browserName: 'chrome' }
});
browserevent.init(this.browser);
I see that there are major changes in object structure between 2.x and 3.x, could this be related?
I followed the instructions for installing the plugin, but when I start the tests I get the following error:
ERROR: Cannot set property 'removeEventListener' of undefined
I have some custom events that are not attached to any element at all
Does this still only support Chrome?
After running the install command, I get the following errors:
$ npm install browserevent
npm WARN deprecated [email protected]: module has been merged into crc32-stream
|
> [email protected] install /Users/russell.trafford/node_modules/browserevent/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
System: Mac OSX 10.9.5
NPM Version: 2.12.0
Webdriverio: 3.0.0
Thanks for your work on 'browserevent' and webdriver.io - v. useful!
The path provided at line 35 doesn't appear to work when browserevent is installed within another project, that is, within node_modules
:
this.crx = fs.readFileSync('./extensions/chrome.crx').toString('base64');
I don't yet have a fix. I'll submit something when I do...
(BTW, my use case is here.)
Best wishes,
Nick
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.