testing - Selenium test cases are failed for a modal popup window -


all test cases fail after execution of test case redirection crm url present. opens url in browser credential popup of crm. says following message

"an exception of type 'openqa.selenium.unhandledalertexception' occurred in webdriver.dll  not handled in user code  additional information: modal dialog present". 

i have used below code handle issue. not working. code snippet used:

string mainwindowhandle = driver.currentwindowhandle.tostring();         reusablefuncpage.gettxtfirstname().sendkeys(keys.enter);                    driver.switchto().window(mainwindowhandle); 

how close credential modal dialog , return parent window continue rest of test cases?


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -