node-osmosis
node-osmosis copied to clipboard
click() method throwing some jQuery related errors
My first 'osmosis' project :) but when I am trying to click() a form submit button getting the following errors and the form seems not to get submitted:
(get) starting
(get) loaded [get] http://www.mj.romarhiva.ro/Webarchive2014/SearchInscriere.aspx
TypeError: Cannot read property 'expando' of null
at //code.jquery.com/jquery-1.9.1.js:1446:80
at //code.jquery.com/jquery-1.9.1.js:1546:3
at //code.jquery.com/jquery-1.9.1.js:9597:3
at Object.Window.eval (/root/osmosis/test/node_modules/libxmljs-dom/lib/Window.js:101:20)
at /root/osmosis/test/node_modules/libxmljs-dom/lib/Window.js:133:28
at /root/osmosis/test/node_modules/libxmljs-dom/lib/HttpRequest.js:39:9
at done (/root/osmosis/test/node_modules/needle/lib/needle.js:357:7)
at PassThrough.
Source program:
var osmosis = require('osmosis');
osmosis .get('http://www.mj.romarhiva.ro/Webarchive2014/SearchInscriere.aspx') .click('#b_ipotecaMobiliara') .set({ 'inputs': ['input@name'] })
.data(function(listing) { // do something with listing data console.log("UNU:"+JSON.stringify(listing)); })
.log(console.log) .error(console.log)
.debug(console.log)
I ve been a casperjs/phantomjs fan until now ..... but the 'osmosis' project looks extremly intersting and light compared to that....
This error is caused by the way certain DOM CSS properties are handled. This will be fixed in the next release. In the mean time, you could submit the form using .submit(selector, [data])
.
I have the same problem, do you know when this next release will be pushed?
I am also facing problems with .click(selector)
. I also tried .trigger('click', selector)
and it didn't work.
I hope to see the fix soon.
same problem here.
so how can I simulate a click? this is not a submit form