How to use the cookie got from Javascript's document.cookie in Ruby mechanize? -
i'm automate login process using ruby mechanize. because it's complex recreate process in mechanize, choose use existing cookies grabbed browser document.cookie
. want know how can use string in ruby mechanize. thanks.
i dont think mechanize runs javascript, you'll have use selenium that.
with selenium, can run arbitrary scripts. example:
driver = selenium::webdriver.for :firefox driver.get("http://some.url") driver.execute_script("console.log('javascript')") driver.close
Comments
Post a Comment