java - Selenium firefox driver takes 30-40 seconds to launch firefox -
i developing tests using selenium webdriver 2.3 , initializing browsers below:
if (testbrowser.equalsignorecase("mozilla")) { dvr = new firefoxdriver(); system.out.println("invoking firefox in system"); } else if (testbrowser.equalsignorecase("ie")) { file file = new file(system.getproperty("user.dir")+"/iedriverserver.exe"); system.setproperty("webdriver.ie.driver", file.getabsolutepath()); dvr = new internetexplorerdriver(); } else if (testbrowser.equalsignorecase("chrome")) { file file = new file(system.getproperty("user.dir")+"/chromedriver.exe"); system.setproperty("webdriver.chrome.driver", file.getabsolutepath()); dvr = new chromedriver(); }
evertime firefox launched takes 30-40 seconds, while launching rest of browsers chrome or safari e.t.c launch within seconds.
though tried solution suggested in blog below didn't work me: https://groups.google.com/forum/#!topic/selenium-users/a2fnff-md_e
will appreciate if has workaround this.
i have profile settings ff using test cases on python. know makes better performance:
profile = webdriver.firefoxprofile() profile.set_preference('general.useragent.override', user_agent) # paint delay off profile.set_preference('nglayout.initialpaint.delay', 0) # tabs animation profile.set_preference('browser.tabs.animate', false) # gif animation off profile.set_preference('image.animation_mode', 'none') # tabs memory off profile.set_preference('browser.sessionhistory.max_total_viewer', 1) profile.set_preference('browser.sessionhistory.max_entries', 3) profile.set_preference('browser.sessionhistory.max_total_viewers', 1) profile.set_preference('browser.sessionstore.max_tabs_undo', 0) # asynchronous requests server profile.set_preference('network.http.pipelining', true) profile.set_preference('network.http.pipelining.maxrequests', 8) # cache enabled profile.set_preference('browser.cache.memory.enable', true) profile.set_preference('browser.cache.disk.enable', true) # autosuggests profile.set_preference('browser.search.suggest.enabled', false) # formfills profile.set_preference('browser.formfill.enable', false) # scan downloads profile.set_preference('browser.download.manager.scanwhendone', false) # no bookmarks backup profile.set_preference('browser.bookmarks.max_backups', 0)
try java syntax.
Comments
Post a Comment