ruby - Loading Firefox profile settings from a JSON file to use in Cucumber testing -



ruby - Loading Firefox profile settings from a JSON file to use in Cucumber testing -

i'm trying create json config file firefox profile setting , load every time fire browser run our cucumber tests. untimely have different configs different browsers. can't figure out how set firefox utilize settings. have is:

json

{ "profile[\"browser.download.folderlist\"]": 2, "profile[\"browser.download.usedownloaddir\"]": true, "profile[\"browser.download.dir\"]": "@@export_download_directory", "profile[\"browser.helperapps.neverask.savetodisk\"]": "\"application/zip, text/html, application/vnd.ms-outlook, message/rfc822, application/vnd.sealed.eml, text/plain, application/vnd.ms-excel, text/csv, text/comma-separated-values, applicatioan/octet-stream\"", "profile.secure_ssl": true, "profile.assume_untrusted_certificate_issuer": false }

and need incorporate somehow in code:

browserprofile = json.parse(io.read('config/firefox.json')) profile = selenium::webdriver::firefox::profile.new driver = selenium::webdriver.for :firefox, profile: profile browser = watir::browser.new(driver)

ruby json firefox hash selenium-webdriver

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -