本文整理汇总了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()));
}
}
示例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;
}
示例3: wdClose
internal static extern WebDriverResult wdClose(SafeInternetExplorerDriverHandle driver);
示例4: wdWaitForLoadToComplete
internal static extern WebDriverResult wdWaitForLoadToComplete(SafeInternetExplorerDriverHandle driver);
示例5: wdSwitchToFrame
internal static extern WebDriverResult wdSwitchToFrame(SafeInternetExplorerDriverHandle handle, string frameName);
示例6: wdSetVisible
internal static extern WebDriverResult wdSetVisible(SafeInternetExplorerDriverHandle handle, int visible);
示例7: wdNewDriverInstance
internal static extern WebDriverResult wdNewDriverInstance(ref SafeInternetExplorerDriverHandle handle);
示例8: wdGetAllWindowHandles
internal static extern WebDriverResult wdGetAllWindowHandles(SafeInternetExplorerDriverHandle driver, ref SafeStringCollectionHandle handles);
示例9: wdGet
internal static extern WebDriverResult wdGet(SafeInternetExplorerDriverHandle handle, string url);
示例10: wdFindElementsByXPath
internal static extern WebDriverResult wdFindElementsByXPath(SafeInternetExplorerDriverHandle driver, SafeInternetExplorerWebElementHandle element, [MarshalAs(UnmanagedType.LPWStr)] string xpath, ref SafeWebElementCollectionHandle result);
示例11: wdFindElementByTagName
internal static extern WebDriverResult wdFindElementByTagName(SafeInternetExplorerDriverHandle driver, SafeInternetExplorerWebElementHandle element, [MarshalAs(UnmanagedType.LPWStr)] string linkText, ref SafeInternetExplorerWebElementHandle result);
示例12: wdExecuteScript
internal static extern WebDriverResult wdExecuteScript(SafeInternetExplorerDriverHandle driver, string script, SafeScriptArgsHandle scriptArgs, ref SafeScriptResultHandle scriptRes);
示例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;
}
示例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;
}
示例15: wdGetTitle
internal static extern WebDriverResult wdGetTitle(SafeInternetExplorerDriverHandle handle, ref SafeStringWrapperHandle result);