[Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver
-
Upload
rakuten-inc -
Category
Technology
-
view
461 -
download
0
description
Transcript of [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver
Introducing Selenium 2 WebDriver
Ryuji Tamagawa @ Sky Co., Ltd.
Appreciations
• To Shiiba-san and everybody in Rakuten involved in this great conference, for inviting me
• To Shinagawa atendees, for joining this session.
• To Singapore atendees, for joining this session lah.
Self introduction - Face1• Ryuji Tamagawa
• FB: Ryuji Tamagawa
• Twitter: @tamagawa_ryuji
• Working for Sky. Co., Ltd.
• SKYSEA Client View development team
• Doing from architecture design to field maintenance - love them !
Self introduction - Face 2
Why translate and talk here ?• for learning great technologies ( by having the deadline )
• for having interaction with great people
• for making my products better (if I could’t invent something great, I can incorporate them)
• for making engineers happier by sharing great ideas !
Agenda
• Why introducing Selenium 2 WebDriver?
• What is Selenium 2 WebDriver?
• Selenium 2 WebDriver demonstration
• Not just for testing - A use case in our team
Why Introducing Selenium 2 WebDriver?
Because learning it could be confusing
• Design of Selenium 1 and 2 are completely different
• The change has happened within a short period of time
• Information about both versions are on the internet
• Definitely you should go for ‘2’, but some may want to use Selenium IDE, which is based on ‘1’s technology
What is Selenium 2 WebDriver?
What is Selenium 2• Today’s major browsers have automation interface
• Selenium 2 WebDrivers are libraries in many languages which make use of the interface
• With WebDrivers, you can drive the browsers and get information of the pages loaded
• Selenium 2 is the collection of tools including the WebDrivers and the selenium server
Browsers(Firefox, IE, Chrome…)
WebDriver(Java, Python , Ruby…)
Your test code
Testing Frameworks (xUnit or others)
Web Apps to test
Remote WebDriver and Selenium Grid
• Selenium Grid distributes test session to nodes which satisfies requested capabilities (ex : type of browser)
Grid Hub
Grid node (Windows)
Firefox Chrome IE
Grid node (Mac OS X)
Firefox Chrome Safari
Web Apps to test
RemoteWebDriver
Test code
RemoteWebDriver
Test code
RemoteWebDriver
Test code
Demonstration (using iPython notebook)
Installation is easy• In Python, ‘sudo pip install selenium’ and done!
• In Java, just download the jar
Not just for testing - A use case in our team
Adding fulltext search to existing BTS• Redmine’s search is not fast
• FESS - opensource enterprise search server, based on Apache Solr
• With Selenium, retrieve recently updated tickets and save them as HTML files
• Selenium works as a scraper
HTML Files
Firefox
script that use WebDriverget updated tickets and save them as HTML files.
Ticket repository, slow to search
She can search tickets on FESS and access directly from their to Redmine tickets.
Lessons learned from our case• Selenium 2 WebDriver can be used as a web automation tool as well. It works as ‘glue’ between systems in this case.
• Without tweaking existing web systems at all, you can read from them and submit information to them
• Doesn’t work fast, but may helpful as quick & dirty tools in your working environment
Final Notes• Selenium 2 is still under heavy development
• You can write stable, maintainable test with Selenium 2, but you have lots to learn
• Especially, dealing with JavaScript activity is still not easy( You sends access information via JavaScript, without giving any change to DOM in browsers, right? )
• But Selenium 2 is the best Web testing tool so far. Worth trying.
Questions?
Thanks for listening.