can't see the HTML of a popup window how to interact with it from selenium -


i trying select status form new windows popup. after clicking select status button opens dialog page can't see html of page. not sure how interact dialog page selenium.

nb: have switched new window can't proceed there.

html looks this..

enter image description here

after clicking select status button following dialog page opens.

select status dialog

but can see html of dialog page how interact form selenium?

update -14/09/17

when click on select status call below url. opened url in separate tab , able see html.

http://xxx.xxx.xxx.int/tasks/status.aspx?currfilters=open

enter image description here

tried select values new windows below...

    public void selectstatus()     {         _selectstatus.click();         browser.switch_to_child_page();         _container.findelement(by.cssselector("input[onclick^='selectall']")).click();     } 

getting following error.

test 'x.regressionsuite.testcases.xtest.tc_x' failed: openqa.selenium.staleelementreferenceexception : element no longer valid

it looks new windows popup. can switch new window. interact it.

// store current window handle string winhandlebefore = driver.getwindowhandle();  // perform click operation opens new window  // switch new window opened for(string winhandle : driver.getwindowhandles()){     driver.switchto().window(winhandle); }  //select checkbox driver.findelement(by.xpath("xpath checkbox")).click();  //click on select button driver.findelement(by.xpath("xpath submit")).click();  // close new window, if window no more required driver.close();  // switch original browser (first window) driver.switchto().window(winhandlebefore); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -