ruby - Loading Firefox profile settings from a JSON file to use in Cucumber testing -
I am trying to create a JSON config file with the settings of my Firefox profile and loads when we open the browser To fire our cucumber tests, randomly we have different configurations for different browsers. I do not understand how to install it so that Firefox will use the settings. Currently what I have:
JSON
{"profile [\ browser.download.folderList \"] ": 2," Profile [\ "browser. "Profiles" ["browser.download.dir \"]: "@@ export_download_directory", "application / zip, text / HTML, app / vnd.ms- approach, message / RFC 822, app / vnd.sealed.eml, text / plain, application / vnd.ms- excel, text / csv, text / comma separated -
< / Pre>and I must include it in code anyway:
/ P>
browserprofile = JSON.parse (IO.read ('config / firefox.json')) Profile = Selenium :: WebDriver :: Firefox :: Profile.New Driver = Selenium :: WebDriver.: Firefox, Profile : Profile Browser = Water :: Browser.NewEUU (Driver)
Comments
Post a Comment