示例#1
0
 public void Click()
 {
     try
     {
         syncWebElement.Click();
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#2
0
 public void ReleaseKey(string keyToRelease)
 {
     try
     {
         keyboard.ReleaseKey(keyToRelease);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#3
0
 public string GetProperty(string propertyName)
 {
     try
     {
         return(syncWebElement.GetProperty(propertyName));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#4
0
 public Screenshot GetScreenshot()
 {
     try
     {
         return(WebDriverConverters.SeleniumScreenshot(syncWebElement.GetScreenshot()));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#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; }
 }
示例#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; }
 }
示例#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; }
 }
示例#8
0
 public void SendKeys(string keySequence)
 {
     try
     {
         keyboard.SendKeys(keySequence);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#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; }
 }
示例#12
0
 public IAlert Alert()
 {
     try
     {
         return(new Alert(syncRemoteTargetLocator.Alert()));
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#13
0
 public void SendKeys(string text)
 {
     try
     {
         syncWebElement.SendKeys(text);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#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; }
 }
示例#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; }
 }
示例#16
0
 public IWebDriver ParentFrame()
 {
     try
     {
         syncRemoteTargetLocator.ParentFrame();
         return(webDriver);
     }
     catch (Zu.WebBrowser.BasicTypes.WebBrowserException webDriverException)
     {
         throw WebDriverConverters.ToSeleniumException(webDriverException);
     }
     catch { throw; }
 }
示例#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; }
 }
示例#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; }
 }
示例#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; }
 }