asp.net - Selenium Firefox Pop-up blocker leads to fail the test case execution -
we using selenium firefox webdriver automate our test cases.
i'm automating sdl tridion manual activities creating component, creating page, tridion out-of box search etc....
when run test cases page creation test case, firefox's pop blocker ending blocking window supposed open. leads failing test case, other test cases working fine(fyi : i'm running local)
on top of selenium project have built 1 asp.net web application , application has been configured in iis successfully. when run project hitting server url, test cases got executed successfully.(note: no firefox pop-up blocker issue)
but couln't execute selenium project our local, because of firefox driver pop-up blocker issue.
i have tried couple of things didn't work out, , mentioned here
1. given url of site in firefox setting's(options->content->add exceptions->url of site)
2. setting preference in firefox profile below
[testfixturesetup] public void init() { try { //driver = new firefoxdriver(); //firefoxbinary fb = new firefoxbinary(@configurationmanager.appsettings["firefoxbinarylocation"]); firefoxbinary fb = new firefoxbinary(@configurationmanager.appsettings["firefoxbinarylocation"]); firefoxprofile fp = new firefoxprofile(); fp.setpreference("browser.startup.homepage_override.mstone", "ignore"); driver = new firefoxdriver(fb, fp); } catch (system.exception ex) { logger.writeerror("exception in instantiating firefox driver : " + ex.message); } }
firefox version :- 38.5.2 webdriver version :- 2.48.0.0
appreciated..thanks...
popups handled in firefox key "dom.disable_open_during_load". can set key value false, allow popup windows. key value can set in desired capabilities.
Comments
Post a Comment