私は、selenium2Libraryを使用してロボットでWindows Chromeのexeファイルを開こうとしています。私は、このコードでCreate Webdriverを使ってWebdriverを作成しようとしましたが、うまくいきません。selenium2ライブラリを使用してChromeアプリケーションをロボットに開く方法
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver.chrome.options
${options.add_extension}= Set_Variable path/to/extension
Create WebDriver Chrome chrome_options=${options}
私はこれを行います...そして、それはセレンで私のアプリを起動します。
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.action_chains import ActionChains
def chromedr():
chrome_options = Options()
chrome_options.binary_location = 'C:/Program Files (x86)/InTouch Health/Carestation/Carestation.exe'
driver = webdriver.Chrome('C:/Program Files (x86)/InTouch Health/Carestation/chromedriver.exe', chrome_options=chrome_options)
return driver
Robot/selenium2Libraryでこれを行うにはどうすればよいですか?
私はこのコードを使用してアプリケーションを起動することができた: $ {オプション} = sys.modules [ 'selenium.webdriver']を評価ChromeOptions()SYS、selenium.webdriver webdriverをクロムmy_alias chrome_options = $ {オプションを作成します。 } executable_path = C:/プログラムファイル(x86の)/Myapp.exe
以下のようなクロムを呼び出すことができますか?何かエラーがありますか?それは間違ったブラウザを開きますか?ロボットはクラッシュするのですか? –
私は自分のアプリを起動することができました... $ {options} = sys.modules ['selenium.webdriver']を評価してくださいChromeOptions()sys、selenium.webdriver WebDriverの作成Chrome my_alias chrome_options = $ {options} executable_path = C:/ Program Files(x86)/ InTouch Health/Carestation/Carestation.exe しかし、ブラウザのような他の呼び出しでこのwebdriverインスタンスを使用することはできません。ユニークなwebdrive(アプリケーションへのリンク)を作成して、セレン/ロボットの呼び出しをそれに向けさせるにはどうすればよいですか。このオブジェクトを他の呼び出しに渡すか、グローバルオブジェクトにする方法はありますか? – lkneafsey
python/seleniumでの注意私は上記の例では 'driver'を使用しています。 – lkneafsey