系統限制
Note: Eggplant Functional works with Selenium Server 2.0, also known as Selenium WebDriver. Supported browsers are Firefox, Google Chrome, Microsoft Edge, Microsoft Internet Explorer 10, and Safari. Typically, you need to install a driver for each browser type you want to use.
運作方式
SenseTalk <==> Selenium Server <==> Browser Drivers <==> Web Page
前置環境建置
安裝homebrew
進入/usr/bin目錄安裝homebrewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝Java
透過homebrewbrew cask install java
安裝Selenium伺服器
brew install selenium-server-standalone
selenium-server --version
安裝後可以執行以下測試selenium版本的指令,看是否正常運作。
MacBook-Pro-2:bin bigd$ selenium-server --version
Selenium server version: 3.141.59, revision: e82be7d358
啟動/關閉Selenium伺服器
執行以下即可啟動
selenium-server -port 4444
PS: 指令視窗是不可以關掉的,才有辦法讓selenium與WebDriver溝通
78版 (支援mac/linux/win32)
https://chromedriver.storage.googleapis.com/index.html?path=78.0.3904.70/
編輯/etc/paths
PS:/Users/bigd/Documents為你下載chromedriver執行的地方
安裝時要多允許安裝
參考連結
//教你如何在mac/window下設定eggplant與selenium
http://docs.testplant.com/ePF/using/epf-selenium-webdriver-testing.htm
MacBook-Pro-2:bin bigd$ selenium-server -port 4444
16:27:37.241 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
16:27:37.370 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2019-11-03 16:27:37.470:INFO::main: Logging initialized @467ms to org.seleniumhq.jetty9.util.log.StdErrLog
16:27:37.833 INFO [WebDriverServlet.] - Initialising WebDriverServlet
16:27:37.965 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
安裝ChromeDriver
請確認你電腦的chrome版本決定要下載的ChromeDriver版本78版 (支援mac/linux/win32)
https://chromedriver.storage.googleapis.com/index.html?path=78.0.3904.70/
編輯/etc/paths
PS:/Users/bigd/Documents為你下載chromedriver執行的地方
#設定你webdriver放置的路徑
/Users/bigd/Documents
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
安裝時要多允許安裝
參考連結
//教你如何在mac/window下設定eggplant與selenium
http://docs.testplant.com/ePF/using/epf-selenium-webdriver-testing.htm
https://www.eggplantsoftware.com/eggplant-functional-downloads
https://blog.eggplantsoftware.com/topic/selenium-webdriver
https://blog.eggplantsoftware.com/selenium-webdriver-find-element-using-sensetalk
https://blog.eggplantsoftware.com/eggplant-functional-automatically-run-selenium-standalone-server-on-windows
//手機
http://docs.testplant.com/ePF/using/epf-webdriver-mobile.htm
http://docs.testplant.com/ePF/SenseTalk/stk-webdriver-mobile.htm
https://blog.eggplantsoftware.com/topic/selenium-webdriver
https://blog.eggplantsoftware.com/selenium-webdriver-find-element-using-sensetalk
https://blog.eggplantsoftware.com/eggplant-functional-automatically-run-selenium-standalone-server-on-windows
//手機
http://docs.testplant.com/ePF/using/epf-webdriver-mobile.htm
http://docs.testplant.com/ePF/SenseTalk/stk-webdriver-mobile.htm
沒有留言:
張貼留言
留個話吧:)