+ All Categories
Home > Technology > [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

[Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Date post: 03-Jul-2015
Category:
Upload: rakuten-inc
View: 468 times
Download: 0 times
Share this document with a friend
Description:
Rakuten Technology Conference 2014 "Introducing Selenium 2 WebDriver" Ryuji Tamagawa (Sky Co., Ltd.)
19
Introducing Selenium 2 WebDriver Ryuji Tamagawa @ Sky Co., Ltd.
Transcript
Page 1: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Introducing Selenium 2 WebDriver

Ryuji Tamagawa @ Sky Co., Ltd.

Page 2: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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.

Page 3: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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 !

Page 4: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Self introduction - Face 2

Page 5: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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 !

Page 6: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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

Page 7: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Why Introducing Selenium 2 WebDriver?

Page 8: [Rakuten TechConf2014] [Osaka] 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

Page 9: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

What is Selenium 2 WebDriver?

Page 10: [Rakuten TechConf2014] [Osaka] Introducing 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

Page 11: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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

Page 12: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Demonstration (using iPython notebook)

Page 13: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Installation is easy• In Python, ‘sudo pip install selenium’ and done!

• In Java, just download the jar

Page 14: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Not just for testing - A use case in our team

Page 15: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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.

Page 16: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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

Page 17: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

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.

Page 18: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Questions?

Page 19: [Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver

Thanks for listening.


Recommended