Skip to main content

Testing: ElementalSelenium's 5 days of frustrations and explorations

Image credit
After many months of trying things out, and finding what I was and was not good at, I have found an interest that I would like to follow: testing. There are so many new things coming out, and with the connected devices that we are starting to see, plus the possibility of problems coming from sources we think are trustworthy - this sounds like a career that I can enjoy, be good at, and grow into.

For those of you who have read my earlier writings, this may sound odd - I've been grumbling about the lack of education for testing in the publicly available courses nearly since this blog started. But, as several have pointed out (occasionally bluntly), if there is a need that isn't filled, what's stopping me from filling it?

So now it's time to move forward, and contribute to having information that I've found useful.

I had a generous someone point me towards ElementalSelenium, once I mentioned that I would like to explore this as a career. Not only does this site provide testing tips (if you work in Selenium, you may enjoy these, and the archive is open), but they offered a free class to let you see exactly what it does, and how.

Yes! This particular group knows that I enjoy the shorter classes, and what the budget for learning resources is (i.e. none), so of course I signed up for this immediately. I had been working on a learning project, and wasn't sure how to test some of the pages- and this seemed like the perfect, easy answer. They offer a selection of languages, which made it even better: my app is Python, so I'm choosing that. There's a virtual environment set up already - might as well make good habits.

And just two things to install? This is even better - I can get set up, and ready to go promptly.

After a bit of introduction, and tips on finding elements to test for (and making notes to go back and add these into my app : blush : ) the first test is written, and ready to go. Of course I'm going to run this! And an error pops up - nothing too unusual: the day had been filled with typos, even on something as familiar as my own name, or the word the. Since, in order to develop the muscle memory to get these in, I had manually typed this test in. I fixed the obvious error, and went on with the class.

This seemed to fit, and will be great to test my app - I was looking forward to the end of the lesson, and getting around to writing my own tests.

And it fails, again.

And this one I don't know what to do with - the browser shows up, but it says it can't find the profile?

Okay, this is learning time, for certain. Time to find out what might be causing the issue. I guess testing to figure out the errors on a testing platform is part of the learning. I'm still happy enough that even if it is technically time to stop for the day, I'm going to continue.

It seems this is common - I don't feel as bad: there's likely several solutions, so I can narrow down where my error is, and know why it happened. As fast as things are changing, my first guess is it's an update to something in the system, or maybe a minor version correction moved a reference.

After looking for a while, I find that, maybe the answer is I need a framework - and there's a selection of them. Start the download/install, and call it a night - this should make it work in the morning!

I also found the Gekodriver (which needed to go in the bin folder of the virtual envelope, and the main Python folder in Windows - this was an issue for a few panicked moments)- this at least is giving me a different error! And a lesson in how long it had been since I installed a tar file

More durable tests? Yes PLEASE! Oh I so want this to work. A fresh cup of tea, and back into research. Even if my typing is passing muster today, I want my tests to work, darn it!

Okay, this one seems straightforward: the answer to a Stack Overflow question. Yes, this looks like my problem - read the answers, and find one by Dharma-krish : pointing out some obvious things. If you have the newest Firefox, use the newest Selenium driver. Okay, that will help - and is obvious. And above this is the way to set a Firefox profile (5 lines instead of 1 - I will take it!)
fp = webdriver.FirefoxProfile()
# Here "2" stands for "Automatic Proxy Configuration"
fp.set_preference("network.proxy.type", 2)
fp.set_preference("network.proxy.autoconfig_url", "http://proxy-address-here:8080/")
driver_ = webdriver.Firefox(firefox_profile=fp)
A deep breath, and trying it on Day 2's code ... it loads, and finds a profile (!) , and the test passes!

Since I have the next day's code up and ready to go, a bit of copy and paste gets the new changes in, and Day 4's code done, and passing. After a few bad starts in making sure files got to their correct places, I now have the code working in both Ubuntu and Windows.

If you have this issue, at least until the next update, this may help you.

  • Make sure you have a testing framework installed 
  • Use the newest version of all the programs
  • For now, make sure Gekodriver is in the PATH (bin folder of the virtual envelope, and the main Python folder in Windows )
  • Set your Firefox profile as above - you can modify it further if needed
  • And have fun!
Day 5's class seems to be on setting up for multiple browsers - I'm going to celebrate having it work in one for the moment.


Popular posts from this blog

30 Days of Postman - for Testers!

  https://www.pexels.com/photo/white-and-brown-cat-lying-beside-a-laptop-and-toys-5468268/ Photo by Karolina Grabowska from Pexels   Working with developer- focused tools can be a challenge for some testers: we may know what the words mean, but haven't used those skills recently enough to make the tasks simple. Or we may not have ever used them, other than at a quick glance to make sure that what we are getting matches what it should be sending. And some give results that require us to go find another team member to help interpret the results. Being a more-independent tester has always been one of my goals - being able to use the tools that are common in the team, and be able to do at least basic tasks that support my tests with them. Our team used Postman for many of the API tasks that we had, so exploring this tool was a natural fit. There are alternatives it there, both graphical and command line, so feel free to explore! The items that you can do, and tools that help

Thanks Giving 2018

http://thriveology.com/wp-content/uploads/2017/11/ThankfulGrateful.jpg It is that season for we Americans: a time to look back at the past year, and count our blessings.  Thanksgiving has come to mean different things then while I was growing up - the focus is no longer on what has gone right, but what wrongs were (and, in some cases continue to be) done. I try and focus on what I can do to minimize the wrong, and accept that the past has happened. And then the fun begins - finding all the things to be thankful for! Things have been rocky, at points this year, I'm still unemployed for money, and have had some serious personal issues arise and be dealt with. But, all in all, I think the bad is outweighed by the good.  This has been a year of changes: not only have I given up on trying to go back to the way things used to be, I have moved forward - supported, encouraged, and occasionally pulled - into a future that I just now am starting to feel I deserve. I still am

Where Is It? Part 1 - Inputs

Photo by Pixabay from Pexels     I am job-searching, and running into some coding challenges. Most of them are simple - some seem to want one-line solutions that require two cups of coffee and a half-hour to figure out what they want. Others are far above where my skills lie, and these I give a try for, and learn. And then there are the ones that offer, seemingly randomly, a challenge - within my skills (or at least my research skills) - that could be used as part of a larger project that I want to work on. This was the case last week, when I tried for a position that was a bit above what I felt I could do comfortably. The challenge was to let someone enter items, and then give back their location. In a language I am just familiar enough to be a danger to myself in. Happily, and thinking forward about how I could use this as a part of a larger program that would  use something like this to interact with the user. And also, this is command line, and thinking of how to set this up to