sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35959
Re: [Question #277189]: Selenium OPEN IE
Question #277189 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/277189
Status: Answered => Open
YongJianYan is still having a problem:
I import selenium jar and
My Code is wrong on "driver = org.openqa.selenium.ie.InternetExplorerDriver(ieCapabilities)"
Could u please help me to solve it
# -*- coding: utf-8 -*-
from sikuli import *
import java.lang
import java.util.concurrent.TimeUnit
#load("selenium4sikulix.jar")
load("selenium-server-standalone-2.48.2.jar")
#from selenium4sikulix import *
#import selenium4sikulix
import org.openqa.selenium.WebDriver
#import org.openqa.selenium.firefox.FirefoxBinary
#import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.ie.InternetExplorerDriver
import org.openqa.selenium.remote.DesiredCapabilities
java.lang.System.setProperty("webdriver.ie.bin", "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe")
java.lang.System.setProperty("webdriver.ie.driver","C:\\Program Files (x86)\\Internet Explorer\\IEDriverServer.exe")
print sys.path
try:
ieCapabilities = org.openqa.selenium.remote.DesiredCapabilities.internetExplorer()
ieCapabilities.setCapability(org.openqa.selenium.ie.InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,True)
driver = org.openqa.selenium.ie.InternetExplorerDriver(ieCapabilities)
driver.manage().window().maximize()
driver.get("www.baidu.com")
driver.manage().timeouts().implicitlyWait(5, java.util.concurrent.TimeUnit.SECONDS);
driver.close()
driver.quit()
except Exception,e:
print e
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.