View
902
Download
2
Category
Preview:
Citation preview
Solaris 11.3(x86)でSelenium WebDriverを
動かしてみた
東平洋史
Seleniumとは?
• 原子番号34の元素
• 元素記号はSe
• 第16族元素
–酸素と同族
–ハロゲンの隣
• 灰色セレン
–金属セレン
–六方晶系
–融点は217.4℃
• 赤色セレン
–単斜晶系
ではなくて
Seleniumとは?
http://docs.seleniumhq.org/
• Webベースアプリケーション用テスト自動化ツール
• ライセンスはApache 2.0 License
Selenium WebDriverhttp://docs.seleniumhq.org/projects/webdriver/
• プログラムからWebブラウザ制御
• 制御可能ブラウザ
– Mozilla Firefox, Google Chrome(Linux, Windows, MacOS, Android), Internet Explorer, Safari, Edge
• 使用可能言語
– Java, Ruby, Python, C#, Javascript(Node.js)など
• OS
– Linux, MacOS, Windowsなど
2016年1月2日
SNSをみていたら
https://twitter.com/satokaz/status/682910995040190464
SolarisでもNode.js動くんだ
ということは
SolarisでもWebDriver動くのでは?
というわけで
調べてみました
各プログラミング言語対応状況
Node.js Python2 Ruby Java
Solaris11.3(x86)
○ ○ ○ ○
○は可動
各プログラミング言語対応状況
Node.js Python2 Ruby Java
Selenium WebDriver
○ ○ ○ ○
○は可動
ということは
各プログラミング言語対応状況(予想)
Node.js Python2 Ruby Java
Solaris11.3(x86)
○ ○ ○ ○
Selenium WebDriver
○ ○ ○ ○
○は可動(予想)
各ブラウザ対応状況(予想)
Seleniumライブラリ
Selenium Grid
言語処理系
検証しました
Node.js
• 動作状況RemoteDriver無修正で動作→ Selenium Grid可動
• Node.js自体のインストールhttp://qiita.com/satokaz/items/b7345834ee8950e42e90
• WebDriverJSのインストールhttps://code.google.com/p/selenium/wiki/WebDriverJs
% npm install selenium-webdriver
Node.js 各ブラウザ対応状況
Seleniumライブラリ
Selenium Grid
言語処理系
Python 2.7
• 動作状況FirefoxDriver、RemoteDriverとも問題なし→Selenium Grid可動
• インストール方法http://selenium-python.readthedocs.org/installation.html
% pip install selenium
Python 2.7 各ブラウザ対応状況
Seleniumライブラリ
Selenium Grid
言語処理系
Ruby 2.1
• 動作状況
– RemoteDriver問題なし→Selenium Grid可動
– FirefoxDriverは応答が怪しい
• インストール方法https://rubygems.org/gems/selenium-webdriver/
% gem install selenium-webdriver
Ruby 2.1 各ブラウザ対応状況
Seleniumライブラリ
Selenium Grid
言語処理系
Java 8
• 動作状況FirefoxDriver、RemoteDriverとも問題なし→Selenium Grid可動
• 使用IDELinux, Mac, Windows と比べてイマイチ
– Eclipse, Intellij IDEAは動作しない
– NetBeans
https://netbeans.org/features/index.htmlしかし、とても重い…
Java 8 各ブラウザ対応状況
Seleniumライブラリ
Selenium Grid
言語処理系
使用可能ブラウザ
Mozilla Firefox
Google Chrome
InternetExplorer
Selenium Grid
Node.js ○ × × ○
Python ○ × × ○
Ruby △ × × ○
Java ○ × × ○
よく見ると
使用可能ブラウザ
Mozilla Firefox
Selenium Grid
Google Chrome
InternetExplorer
Android
Node.js ○ ○ ○ ○
Python ○ ○ ○ ○
Ruby △ ○ ○ ○
Java ○ ○ ○ ○
色々使える
ここで実習
実習内容
次のテストを行なうスクリプトの作成
1. Googleで「小江戸らぐ」を検索
2. 次のページを表示OSS支える!コミュニティー訪問~小江戸らぐ-川越を中心にゆるく活動するLinuxユーザー会
3. 写真をクリックして拡大表示
© 日経BP社http://itpro.nikkeibp.co.jp/article/COLUMN/20131003/508665/
Solaris 11.3(x86)のFirefoxを操作
Solaris 11.3(x86)からIEを操作
まとめ
Node.js Python2 Ruby Java
Solaris11.3(x86)
○ ○ ○ ○
Selenium WebDriver
○ ○ △ ○
○:可動△:一部可動
Selenium Gridは全て使用可
他のOSも同様
Python 2.7 on NetBSD 7.0(amd64)
Seleniumライブラリ
Selenium Grid
Python 2.7処理系
NetBSD 7.0(amd64)からIEを操作
頑張ってみよう
おしまい(^.^)/~~~
Recommended