Selenium Webdriver to wait for loading frame content in c# -


i doing selenium webdriver automation facing critical issue frame. in application there link named --print. when user clicks on print link ...one frame window gets opened . on frame there submit button along checkboxes , links. when user selects checkboxes , clicks on "submit" button time again result means" selected checkboxes , links" got displayed on frame.

but problem there many links loaded after time. have requirement not use explicit wait because doing performance testing. have wail till frame content load without explicit wait.

i have tried many things below

while (!table.findelement(by.xpath("//*[contains(text(),'" + tin +     "')]/following::span")).text.equals("complete"))                         //while(!table.findelement(by.xpath("//*[contains(text(),'" + tin +     "')]/following::span")).text.equals("complete"))                         {                             continue;                         }                         twobase.logger.loginfo("printed return " + tin + " displayed in print returns results grid status complete"); 

in short have verify --when number tin there should status completed...but taking time

note: able switch frame , can verify tin number , status have avoid wait ... have read grid once frame loaded , ready.

here complete method:
2.

public void testmethod(list<string> ssn)         {             try             {                               twobase.driver.switchto().frame(0);                  twobase.logger.loginfo("print returns results dialog box opened");                 iwebelement table = twobase.driver.findelement(by.id("ctl00_contentplaceholder_resultsgrid"));                                 twobase.logger.loginfo("verifying print returns displayed in print returns results...");                   foreach (string tin in ssn)                 {                     while (!table.findelement(by.xpath("//*[contains(text(),'" + tin + "')]/following::span")).text.equals("complete"))                     {                         continue;                     }                     twobase.logger.loginfo("printed return " + tin + " displayed in print returns results grid status complete");                  }                 twobase.stop();                  if (!returndisplayed)                     twobase.testcaseresult = false;             }             catch (exception ex)             {                 twobase.logger.logexception(ex);              }          } 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -