Advertisement
Milotronik

OpenMultiPageLink

Jan 25th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1.    public void OpenMultiPageLink(string _link)
  2.         {
  3.             try
  4.             {
  5.                 iTime = System.DateTime.Now;
  6.  
  7.                 string multiPageContainerId = "ctl00_ContentPlaceHolder1_EvidenceEntry1_RadMultiPage1";
  8.  
  9.                 IWebElement multiPageContainer= vergeDriver.FindElement(By.Id(multiPageContainerId));
  10.                
  11.                 //Click link
  12.                 multiPageContainer.FindElement(By.LinkText(_link)).Click();
  13.  
  14.                 generateResult(iTime, "OpenMultiPageLink", true, "-- View Data --", "OK");
  15.             }
  16.             catch (WebDriverException w)
  17.             {
  18.                 generateResult(iTime, "OpenMultiPageLink", false, "-- WD: View Data --", w.Message);
  19.             }
  20.             catch (Exception e)
  21.             {
  22.                 generateResult(iTime, "OpenMultiPageLink", false, "-- GE: View Data --", e.Message);
  23.             }
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement