当前位置: 首页>>代码示例>>C#>>正文


C# IE.SafeInternetExplorerDriverHandle类代码示例

本文整理汇总了C#中OpenQA.Selenium.IE.SafeInternetExplorerDriverHandle的典型用法代码示例。如果您正苦于以下问题:C# SafeInternetExplorerDriverHandle类的具体用法?C# SafeInternetExplorerDriverHandle怎么用?C# SafeInternetExplorerDriverHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SafeInternetExplorerDriverHandle类属于OpenQA.Selenium.IE命名空间,在下文中一共展示了SafeInternetExplorerDriverHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InternetExplorerDriver

 /// <summary>
 /// Initializes a new instance of the InternetExplorerDriver class.
 /// </summary>
 public InternetExplorerDriver()
 {
     handle = new SafeInternetExplorerDriverHandle();
     WebDriverResult result = NativeDriverLibrary.Instance.NewDriverInstance(ref handle);
     if (result != WebDriverResult.Success)
     {
         throw new WebDriverException(string.Format(CultureInfo.InvariantCulture, "Cannot create new browser instance: {0}", result.ToString()));
     }
 }
开发者ID:promo888,项目名称:selenium,代码行数:12,代码来源:InternetExplorerDriver.cs

示例2: GetCurrentWindowHandle

 /// <summary>
 /// Gets the identifying handle string of the current window.
 /// </summary>
 /// <param name="driverHandle">A handle to the instance of the <see cref="InternetExplorerDriver"/> class.</param>
 /// <param name="handleWrapperHandle">A pointer to a string containing the window .</param>
 /// <returns>A <see cref="WebDriverResult"/> value indicating success or failure.</returns>
 internal WebDriverResult GetCurrentWindowHandle(SafeInternetExplorerDriverHandle driverHandle, ref SafeStringWrapperHandle handleWrapperHandle)
 {
     IntPtr functionPointer = NativeMethods.GetProcAddress(nativeLibraryHandle, GetCurrentWindowHandleFunctionName);
     StringReturningDriverFunction getCurrentWindowHandleFunction = Marshal.GetDelegateForFunctionPointer(functionPointer, typeof(StringReturningDriverFunction)) as StringReturningDriverFunction;
     WebDriverResult result = getCurrentWindowHandleFunction(driverHandle, ref handleWrapperHandle);
     return result;
 }
开发者ID:hugs,项目名称:selenium,代码行数:13,代码来源:NativeDriverLibrary.cs

示例3: wdClose

 internal static extern WebDriverResult wdClose(SafeInternetExplorerDriverHandle driver);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例4: wdWaitForLoadToComplete

 internal static extern WebDriverResult wdWaitForLoadToComplete(SafeInternetExplorerDriverHandle driver);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例5: wdSwitchToFrame

 internal static extern WebDriverResult wdSwitchToFrame(SafeInternetExplorerDriverHandle handle, string frameName);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例6: wdSetVisible

 internal static extern WebDriverResult wdSetVisible(SafeInternetExplorerDriverHandle handle, int visible);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例7: wdNewDriverInstance

 internal static extern WebDriverResult wdNewDriverInstance(ref SafeInternetExplorerDriverHandle handle);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例8: wdGetAllWindowHandles

 internal static extern WebDriverResult wdGetAllWindowHandles(SafeInternetExplorerDriverHandle driver, ref SafeStringCollectionHandle handles);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例9: wdGet

 internal static extern WebDriverResult wdGet(SafeInternetExplorerDriverHandle handle, string url);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例10: wdFindElementsByXPath

 internal static extern WebDriverResult wdFindElementsByXPath(SafeInternetExplorerDriverHandle driver, SafeInternetExplorerWebElementHandle element, [MarshalAs(UnmanagedType.LPWStr)] string xpath, ref SafeWebElementCollectionHandle result);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例11: wdFindElementByTagName

 internal static extern WebDriverResult wdFindElementByTagName(SafeInternetExplorerDriverHandle driver, SafeInternetExplorerWebElementHandle element, [MarshalAs(UnmanagedType.LPWStr)] string linkText, ref SafeInternetExplorerWebElementHandle result);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例12: wdExecuteScript

 internal static extern WebDriverResult wdExecuteScript(SafeInternetExplorerDriverHandle driver, string script, SafeScriptArgsHandle scriptArgs, ref SafeScriptResultHandle scriptRes);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs

示例13: GetElementScriptResult

 /// <summary>
 /// Retrieves the value from the script result.
 /// </summary>
 /// <param name="scriptResultHandle">A handle to the result of the script.</param>
 /// <param name="driverHandle">A handle to the instance of the <see cref="InternetExplorerDriver"/> class.</param>
 /// <param name="scriptResultValue">A value representing the value of the returned object from the script.</param>
 /// <returns>A <see cref="WebDriverResult"/> value indicating success or failure.</returns>
 internal WebDriverResult GetElementScriptResult(SafeScriptResultHandle scriptResultHandle, SafeInternetExplorerDriverHandle driverHandle, out SafeInternetExplorerWebElementHandle scriptResultValue)
 {
     IntPtr functionPointer = NativeMethods.GetProcAddress(nativeLibraryHandle, GetElementScriptResultFunctionName);
     ElementReturningScriptResultFunction scriptResultFunction = Marshal.GetDelegateForFunctionPointer(functionPointer, typeof(ElementReturningScriptResultFunction)) as ElementReturningScriptResultFunction;
     WebDriverResult result = scriptResultFunction(scriptResultHandle, driverHandle, out scriptResultValue);
     return result;
 }
开发者ID:hugs,项目名称:selenium,代码行数:14,代码来源:NativeDriverLibrary.cs

示例14: GetElementAttribute

 /// <summary>
 /// Gets an attribute of the specified element.
 /// </summary>
 /// <param name="driverHandle">A handle to the instance of the <see cref="InternetExplorerDriver"/> class.</param>
 /// <param name="elementHandle">A handle to the instance of the <see cref="InternetExplorerWebElement"/> class.</param>
 /// <param name="attributeName">The name of the attribute.</param>
 /// <param name="attributeValueWrapperHandle">A pointer to a string containing the attribute value.</param>
 /// <returns>A <see cref="WebDriverResult"/> value indicating success or failure.</returns>
 internal WebDriverResult GetElementAttribute(SafeInternetExplorerDriverHandle driverHandle, SafeInternetExplorerWebElementHandle elementHandle, string attributeName, ref SafeStringWrapperHandle attributeValueWrapperHandle)
 {
     IntPtr functionPointer = NativeMethods.GetProcAddress(nativeLibraryHandle, GetElementAttributeFunctionName);
     GetElementAttributeFunction getAttributeFunction = Marshal.GetDelegateForFunctionPointer(functionPointer, typeof(GetElementAttributeFunction)) as GetElementAttributeFunction;
     WebDriverResult result = getAttributeFunction(driverHandle, elementHandle, attributeName, ref attributeValueWrapperHandle);
     return result;
 }
开发者ID:hugs,项目名称:selenium,代码行数:15,代码来源:NativeDriverLibrary.cs

示例15: wdGetTitle

 internal static extern WebDriverResult wdGetTitle(SafeInternetExplorerDriverHandle handle, ref SafeStringWrapperHandle result);
开发者ID:epall,项目名称:selenium,代码行数:1,代码来源:NativeMethods.cs


注:本文中的OpenQA.Selenium.IE.SafeInternetExplorerDriverHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。