So, Appium doesn’t have this turned on by default, because it is again potentially a security risk.
You could go to a web page, and somebody could start running tests on your Appium server –
running on your machine without your knowledge. That’s pretty scary. So, you have to start the
Appium server with that special flag to make sure that that’s able to happen. Otherwise, you can
bundle this web driver package into your own JavaScript projects that you can run within a web
page. So, that’s pretty amazing. The Web2driver code looks very much like something you’d expect from WebDriver IO, and in
fact, we built Web2driver on top of the same code that WebDriver IO is built off of. So, it uses all
that logic, which has obviously been quite battle-tested over the years. So, running a test looks
like defining your capabilities, starting a session, finding elements. Everything is promise-based,
so you can use async/await to keep your code clean.
So, it’s pretty much a standard WebDriver and Appium client. I say Appium client, but really
could use this for Selenium too. Although Selenium doesn’t support the allow CORS headers.
So, you’re kind of out of luck, unless you put a proxy in front of Selenium that you built.
Why do we want a web-based Appium client?
Well, what if we could build Appium tools that require nothing but a browser – no downloads, no
command lines – just your browser. This is, I think, pretty interesting.
So, this is exactly what we’ve been working on at HeadSpin. Here’s a little video of something
called the HeadSpin Recorder, which is I guess in beta now. So, if you’re a HeadSpin user –
talk to your account people and see if you can get access to this soon. But, the idea is that you
load your app, you define the type of device you want to use, and then this recorder interface
pops up.
The interface looks different, but it’s actually very similar to Appium Desktop, in the sense that it
gives you a kind of point-and-click interface to use with your application. But, what’s happening
is that this is all just taking place in your browser.
So, you just go to your HeadSpin account, go to your recorder tab, and you can load it up. You
don’t have to download Appium Desktop or anything else. And, what’s really interesting about it
is that not only does the recorder record your actions, but then you can have them play back
and you can even set them to play back at set intervals. So, you can essentially define your own
Appium-based test without using any code. So obviously there are limitations to any kind of
no-code approach, but this can get you pretty far and it’s been pretty stable so far as I’ve been
playing with it. So, this is just kind of showing you some examples of you know, clicking on things and finding
an element – very similar to Appium Desktop. You can see the actions proceeding here. So,
there’s all kinds of different interactions you can use. You can even do swipes. So, here’s a
swipe happening, and then you can even find elements by image. This is one of the cool things
about the HeadSpin Recorder. You can select a region of the screen that may or may not be an