How I learned Selenium

Published Dec 14, 2017

About me

I am a Python developer based in Nepal who's been working in this stack for almost 3 years. I love new challenges when it comes to creating things and experimenting with code to make things happen.

Why I wanted to learn Selenium

I always liked the idea of being able to automate web browsing. Be it for fun or profit. I always thought it would be a great skill to learn. The idea of being able to click buttons, submit forms automatically fascinated me towards learning Selenium.

How I approached learning Selenium

At first, I tried picking the best advices from people who have already done it. Most of them came from Quora, Stackoverflow and linkedin. At job, I was assigned with a task to post to multiple facebook groups automatically. So, I considered the steps that would help me achieve things in the best/quickest possible way.

Challenges I faced

The biggest challenge was handling exceptions. We almost always face problems finding the right element in the sample space to target to. Selenium has got tons of ways to extract elements, but it is still challenging to hit the right one.

Key takeaways

I learnt to use exception handling properly after learning selenium. Also, waits and timing handling were crucial takeaways for me while learning selenium.

Tips and advice

Try several things before finding out the best one that fits for you. That's how extracting elements work in selenium. You may have to try different delays or conditions to get the elements properly. Learn the concepts of xpaths well. A good understanding of Javascript will also help, because we can execute JS scripts using Selenium, isn't that cool ?

Final thoughts and next steps

Overall, I think Selenium is a great tool for automated tests and web crawling. I plan to learn more aspects of it including proxies, headless browsers, etc. very soon.

Discover and read more posts from Dipesh Pandey
get started