c# Selenium WebDriver. Firefox browser blocks popup windows -


i'm using firefox 19.0.2, selenium 2.31.2.0

in set method enable popup blocking via firefox profile firefoxprofile.setpreference("dom.disable_open_during_load", true); option required customer wants worked popup blocking enabled.

in test need share content external community. when press button external community popup appear. problem when perform actions hands, goes fine , popup doesn't block. when try click button via webdriver firefox blocks popup.

click button that:

//kind of mouse on emulation     new actions(driver).movetoelement(_element).release(_element).build().perform();     _element.click(); 

i think problem in differences between native button click , click performed webdriver. setting enablenativeevents = true in firefox profile not solution, because tests become unstable.

maybe face problem , can provide solution.

action composed 3 steps.

configure action

actions builder = new actions(driver);  builder.movetoelement(_element).release().click(); 

get action

action pushbutton = builder.build(); 

execution

pushbutton.perform(); 

tell me if improved that.

edit :

.release() used drag , drop action.

i've found 2 specs, here , here. read.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -