本文整理汇总了C++中InternetExplorerDriver类的典型用法代码示例。如果您正苦于以下问题:C++ InternetExplorerDriver类的具体用法?C++ InternetExplorerDriver怎么用?C++ InternetExplorerDriver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InternetExplorerDriver类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wdFindElementByXPath
int wdFindElementByXPath(WebDriver* driver, WebElement* element, const wchar_t* xpath, WebElement** result)
{
if (!driver || !driver->ie) { return ENOSUCHDRIVER; }
CComPtr<IHTMLDOMNode> res;
InternetExplorerDriver* ie = driver->ie;
CComPtr<IHTMLElement> elem;
if (element && element->element) {
elem = element->element->getWrappedElement();
}
try {
ElementWrapper* wrapper;
int res = ie->selectElementByXPath(elem, xpath, &wrapper);
if (res != SUCCESS) {
return res;
}
WebElement* toReturn = new WebElement();
toReturn->element = wrapper;
*result = toReturn;
return SUCCESS;
} END_TRY;
}
示例2: wdFindElementById
int wdFindElementById(WebDriver* driver, WebElement* element, const wchar_t* id, WebElement** result)
{
*result = NULL;
if (!driver || !driver->ie) { return ENOSUCHDRIVER; }
InternetExplorerDriver* ie = driver->ie;
CComPtr<IHTMLElement> elem;
if (element && element->element) {
elem = element->element->getWrappedElement();
}
try {
clock_t end = endAt(driver);
int res = ENOSUCHELEMENT;
do {
ElementWrapper* wrapper;
res = ie->selectElementById(elem, id, &wrapper);
if (res != SUCCESS) {
continue;
}
WebElement* toReturn = new WebElement();
toReturn->element = wrapper;
*result = toReturn;
return SUCCESS;
} while (clock() < end);
return res;
} END_TRY;
}
示例3: getIe
JNIEXPORT void JNICALL Java_org_openqa_selenium_ie_InternetExplorerDriver_get
(JNIEnv *env, jobject obj, jstring url)
{
InternetExplorerDriver* ie = getIe(env, obj);
const wchar_t* converted = (wchar_t *)env->GetStringChars(url, 0);
ie->get(converted);
env->ReleaseStringChars(url, (jchar*) converted);
}