To study Japanese I added to my Mac some extra keyboard layouts. However when I was reviewing my Anki cards I found annoying every time to have to press on the little flag icon and chose the appropriate layout. On OSX (El Captain, but I guess is the same on older ones), you can add a shortcut which I set to
⌥Space to avoid conflicting with Spotlight.
What is a Singleton? A singleton is a class which should only be initialized once, provide a way to allow multiple instances of that class to be used, and finally to be the central point of access for that class.
Typical use cases of a singleton are classes accessing to system resources. In my scenario I want for example to create a singleton for Selendroid, since I really want to create just one instance of Selendroid to run all my tests.
Continue reading Java Design Patterns: Implementing a singleton for Selenium WebDriver
Previously I used the jar libraries for the Selenium/Selendroid project to work fine, however the method is not really ideal. Project dependencies should be imported automatically with a dependency sistem of some sort. Here I am going to add Maven to the project and manage the dependenices through it. Here I am going to add selenium-java and selendroid-standalone, but this is of course valid for any other library.
Continue reading Adding Maven to a project in IntelliJ
Selenium is great for testing web applications in general, however one of the least used things in this space are iFrames. You might be interested into them because you want to automate logging in, or because you have sandboxed elements into your application.
Fortunately, in Selenium is quite easy to achieve this result: all we need to do is to switch context, which can be done in three separated calls.
- Find the iFrame element
- Switch the driver to the iFrame
- Play with the contents of the iFrame!
Continue reading Accessing an iFrame through Selenium WebDriver
So now that we know that Selenium is working as we expect (I am a newbie here), we can try adding Seledroid. If you haven’t used Selendroid before, I strongly recommend you to follow the initial setup guide, available here. Basically you will need to have
ANDROID_HOME variables correctly set up in your system.
Continue reading A simple test with Seledroid
If you followed my last post you should be ready to write a very simple test, which purpose is to make sure that all the settings are correct in our testing environment.
Continue reading Writing the fist Selenium Test
Before getting into using Seledroid, it is probably a good idea to see if my old understandings of Selenium still apply. I haven’t used it in ages, so as a first step I will configure an IntelliJ project using Selenium.
Continue reading Getting ready to write our first Selenium Test in IntelliJ
It is always a problem automating testing in the mobile world, because the technologies used in the desktop world are not capable of the same level of testing, therefore we are looking for technologies that will allow us to at least do some level of mobile testing.
The first tool we are going to try is Selendroid, which seems to be the standard tool when it comes to Android mobile testing.
Selendroid uses the JSON Wire protocol, ready for Selenium 3. It makes possible to test native, hybrid applications and the mobile web. In our scenario we’re interested to the last two. Also Selendroid supports simulated devices as well as real ones.
Why is this important? Because the ability to distinguish between a user initialized action and a scripted one can make the difference to optimize the UI.
Continue reading Event.isTrusted property from UI Events shipped in Chrome 46
Tips, settings, compositions Besides passion & patient, to photograph great landscapes photos, it takes a fair amount of preparation and skill in basic photography technique. This article focuses on some important, but not all, aspects of landscape photography that photographers need to master when photographing landscape. Don’t leave home without them. We are referring to gear other than the obvious two, your camera and lenses.
Continue reading Beginners Guide to Landscape Photography