Java Selenium Template Project

Chieko HigashiChieko Higashi
2 min read

Earlier last year I had to write some automated tests using Playwright for a job that I was applying for. I was pleasantly surprised how well Playwright documentation was written. It provided everything I needed to set up the framework and to begin writing my automated tests. I didn’t need to watch any YouTube videos or search for more articles like I used to do with Selenium.

This month I had to write some Java Selenium tests for another job that I applied for. When I realized that it had been a decade since I used Java Selenium, I expected the Selenium documentation to have improved by now. Boy, was I wrong!

The Selenium documentation doesn’t even tell you how you can set up the framework, or which other libraries or tools you need to install. I, again, had to search for YouTube videos and some other blog posts and articles just to set it up, and it took a LOT of time.

So I wrote a simple Java Selenium template project so that anyone can clone it and start writing the Java Selenium tests: https://github.com/c-higashi/myseleniumtest

I have also provided some sample tests as well. Hope this helps other people like me (who had to jump back into the Java Selenium world after being immersed in the TypeScript world for some time).

去年の始めに、あるQAポジションに応募した時に出された課題の一つが自動テストを書くことだったので、初めてPlaywrightをちゃんと使ってみました。昔使っていたSeleniumと違い、ドキュメンテーションがすごく良く書かれていることにいい意味でびっくりしました。ドキュメンテーションを読むだけで、Playwrightフレームワークをセットアップ出来、サクサクとテストを書くことができました。

最近また別のQAポジションに応募した時に、今度はJava Seleniumを使って自動テストを書く課題が出されました。気づけば最後にJava Seleniumを使ったのは10年前。その頃のSeleniumのドキュメンテーションは全く使えないものだったけど、これだけ時間が経ってるからには、流石に改善されてるだろうと思っていたら、とんだ間違いでした。

相変わらず、フレームワークをどうやってセットアップすればいいのかに関しての基本的なステップさえ書かれていない。以前のように、YouTubeや他の人のブログや記事を探さなければなりませんでした。Java Seleniumの開発環境を整えるだけで、かなり時間がかかりました。

そこで、誰でも簡単にクローン出来て、さっさとJava Seleniumのテストを書き始めることが出来る、簡単なテンプレートプロジェクトを作ってみました。

https://github.com/c-higashi/myseleniumtest

簡単なテストやページオブジェクトも書いてあります。私のように(特にTypeScriptにすっかり慣れた後に)久方ぶりにJavaの世界に戻らないといけない方々のお役に立てると幸いです。

ReplyForwardAdd reaction

0
Subscribe to my newsletter

Read articles from Chieko Higashi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Chieko Higashi
Chieko Higashi