Exemplo n.º 1
0
 public void Click()
 {
     try
     {
         syncWebElement.Click();
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 2
0
 public void ReleaseKey(string keyToRelease)
 {
     try
     {
         keyboard.ReleaseKey(keyToRelease);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 3
0
 public string GetProperty(string propertyName)
 {
     try
     {
         return(syncWebElement.GetProperty(propertyName));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 4
0
 public Screenshot GetScreenshot()
 {
     try
     {
         return(WebDriverConverters.SeleniumScreenshot(syncWebElement.GetScreenshot()));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 5
0
 public ReadOnlyCollection <IWebElement> FindElementsByXPath(string xpath)
 {
     try
     {
         return(new ReadOnlyCollection <IWebElement>(syncWebElement.FindElementsByXPath(xpath).Select(v => (IWebElement) new WebElementAdapter(v, driver)).ToList()));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 6
0
 public IWebElement FindElementByPartialLinkText(string partialLinkText)
 {
     try
     {
         return(new WebElementAdapter(syncWebElement.FindElementByPartialLinkText(partialLinkText), driver));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 7
0
 public IWebElement FindElementByXPath(string xpath)
 {
     try
     {
         return(new WebElementAdapter(syncWebElement.FindElementByXPath(xpath), driver));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 8
0
 public void SendKeys(string keySequence)
 {
     try
     {
         keyboard.SendKeys(keySequence);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 9
0
 public IWebElement ActiveElement()
 {
     try
     {
         return(new WebElementAdapter(syncRemoteTargetLocator.ActiveElement(), webDriver));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
 public void GoToUrl(Uri url)
 {
     try
     {
         syncNavigation.GoToUrl(url);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
 public void Refresh()
 {
     try
     {
         syncNavigation.Refresh();
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 12
0
 public IAlert Alert()
 {
     try
     {
         return(new Alert(syncRemoteTargetLocator.Alert()));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 13
0
 public void SendKeys(string text)
 {
     try
     {
         syncWebElement.SendKeys(text);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 14
0
 public IWebElement FindElement(By by)
 {
     try
     {
         return(new WebElementAdapter(syncWebElement.FindElement(WebDriverConverters.By(by)), driver));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 15
0
 public string GetAttribute(string attributeName)
 {
     try
     {
         var res = syncWebElement.GetProperty(attributeName);
         return(res ?? syncWebElement.GetAttribute(attributeName));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 16
0
 public IWebDriver ParentFrame()
 {
     try
     {
         syncRemoteTargetLocator.ParentFrame();
         return(webDriver);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 17
0
 public IWebDriver Frame(IWebElement frameElement)
 {
     try
     {
         syncRemoteTargetLocator.Frame(((WebElementAdapter)frameElement).GetSyncWebElement());
         return(webDriver);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 18
0
 public IWebDriver Window(string windowName)
 {
     try
     {
         syncRemoteTargetLocator.Window(windowName);
         return(webDriver);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
Exemplo n.º 19
0
 public void Submit()
 {
     try
     {
         syncWebElement.Submit();
         //TODO remove Sleep
         Thread.Sleep(100);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }