當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。