Tech Episode: Diving into Open Source RPA With Robot Framework and RPA Framework

In this episode, we dive into how developers can try out Robot Framework and RPA Framework.  This episode follows up on our conversation with Antti from Robocorp and dives into tooling and code.

Brent and Mark share some sample code:

We dive through these examples to demonstrate how Robot Framework and RPA Framework work together.  We examine the landscape is like for developers to use these Python-based open-source automation tools.  Take a look at the code in conjunction with this podcast to follow along.  Mark and Brent discuss what the difference between this toolset is vs the big RPA players (UI Path, AA, Blue Prism).  

If you are considering rolling out automations using Robot Framework.  The folks at Robocorp have docs written that walk through how to run "in production".  

Google Play / Apple Podcasts / Spotify


Tech Episode: Diving into Open Source RPA With Robot Framework

• 42:59

SUMMARY KEYWORDS

python, robot, framework, keyword, otp, run, rpa, library, write, automation, test, open, ucc, code, docs, bot, background, search, file, people

SPEAKERS

Mark Percival, Brent Sanders


Brent Sanders  00:00

Today we are going to do something we've never done before is dive into some code is heavy. It's automic developer episodes were from our, our prior, not most recent interview, but two interviews ago with Antti from Robocorp. Both of us being have tech backgrounds and software engineering backgrounds, diving into robot framework and RPA framework as a developer episode. So today, in this episode, I think we're gonna go through some sample code that we've put together and posted up on GitHub, which you can find at Github.com/itsautomic. There's a first project that we'll talk through which I created, that's a trivial example, it's called search in store basically fills out a webform that has some conditional fields, right. So it's not like the most simple Hello World. But submits a search from a state agency here in Illinois, and then we'll send the results to some API endpoint. So it could be useful for who knows what, but shows, you know, some of the killer feature is that I think Antti was right about it. So I'm, I would say after market, I mean, I'll let you in opine on your experience. But after, you know, diving into this and spending a couple hours and seeing what it can do as compared to working trying to work with UiPath, and a little bit of automation anywhere. I feel way more comfortable with this.


Mark Percival  01:32

Yeah, I mean, I think it definitely depends on your background. If you're coming from a developer background, this makes a lot of sense. So I understand, I definitely understand the both sides of the story here. You know, there's something very enticing about UiPath, and automation anywhere where it's in this UI, this UI, this ID that they build. But the flip side is if you've ever kind of written Selenium test, or you've kind of been in that, you know, test automation background, if you have any background in that, this just kind of makes a lot more sense for you, as a developer. You're even talking to our last guests who came from a Python background. Like I think the same thing. If you come from a Python background, even if it's not, you know, serious development, if it's just, you know, kind of dabbling in Python, this still makes a fair amount of sense. There's definitely some sticking points, and it's still very early. You know, I don't this is this is I still feel like we're still really early in the open source. Yeah, RPA space, basically, the developer side of it. But this feels, you know, it feels right. For me, I think for the listeners, if you're, if you're not a developer, there might still be some value in this. And hopefully there is, which is, you know, we'll go through some of the difficulties, and maybe not all of it will be something that everybody understands. But hopefully, there's maybe get something out of it. But for people that have a bit more development background, I think it'll be fairly useful.


Brent Sanders  02:49

Right, right. And so to kick it off, we are using two pieces of or two frameworks, essentially, there's robot framework, an RPA framework. And, you know, when we were interviewing Anttti, I felt massively unprepared. So I kept mixing those up RPA framework robot framework, I, the robot framework is sort of the older legacy, it was supported by Nokia, for many years. And then the robot framework foundation is the current sort of maintainer. That is the sort of platform in which you write most of your code. And we'll get into you know, what you're working with. And then robot framework, I'm sorry, I'm already doing it. RPA framework is a collection of open source libraries and tools for robotic process automation. And so it's meant to be used with robot framework, and Python. So this was made by the fine people at Robo hub. And it includes sort of a set of libraries for the browser for AWS, database, Excel, all the things that, you know, you get out of a UI path or automation anywhere that you would kind of expect out of your, like, if you're a UI path user, you know, you'll you would have an activity that's open a browser window and in head here and start clicking buttons and identifying items on the page and pulling them down. Right. So,


Mark Percival  04:11

Yeah, I think, to kind of just reiterate, with robot framework, it's it's, it's it really is sort of its own language, right, or to cucumber or gherkin. If you've ever written any tests, what you would call them, there's a certain there's a name for them.


Brent Sanders  04:26

I think it's BDD, right? behavioral, yes. That's behavioral behavior driven design. So you know, you have your, your product manager saying what things should and shouldn't do. And it was always this sort of given when then structure, right? 


Mark Percival  04:39

And so, that really kind of if you've ever been exposed to that, and you come to robot frame where you're like, Oh, I this makes sense. At least the syntax starts to make sense. So the syntax is very human friendly. syntax. So you know, I know it's hard to give an example for the podcast. But, you know, some of the you know, you kind of mentioned it, but it's open, you know, open with browser, you know, go to this site and the site name. Right. And that kind of gets you started.


Brent Sanders  05:06

Yeah. So before I and I think maybe it makes sense, we'll dive into the search and store repo, which is, you know, very much like a Hello World example. It's meant to be trivial. It's meant to kind of show the basics, it's not really going that far in depth to either one of these frameworks, but does show a killer feature, which is, in my mind, you can drop back to Python at any time. And I think, you know, Mark, you probably know better than I would, I feel like you can do that with UiPath, you can do that with a lot of these different pieces. But myself as with a Python background, I get a little especially tickled over that.


Mark Percival  05:43

Yeah, I think you can do it with I mean, all of the UiPath in the automation anywhere is usually have some way of dropping to some other, you know, process or language. But obviously, there's dependencies there, you know, how Python installed locally, you have to have kind of solve the problem, not that this goes away with this at all. But by default, if you're using robot framework, you've already got Python installed, because it's a requirement. Whereas if you have UiPath, there's no guarantee that you have Python or the person using it has Python installed. But you know, they do have UiPath installed. So it's not necessarily apples to apples, but there is a way to drop down. I think you're right, though this is much more in line with it dropping into Python here is obviously very easy because it is written in Python.


Brent Sanders  06:24

Right? You're not sort of interrupted interoperating between you know, languages. And so I'm, I've been running on a Mac, I'm too late, I have a PC in the room, I'm too lazy to get up from my desk and work on that. But you are working on a Windows machine. And that does not come with Python pre installed least in most, I don't think it does. Even in the latest version. I know they have more of a Linux flavor that's coming out, but, what was it like?


Mark Percival  06:49

They do their best, you type Python, it actually opens the App Store. Yo, okay, they've wedged in a shim to basically like, Oh, yeah, we have Python, not really, here's the App Store. And which is very confusing when you type Python dash V, and it, nothing happens because it just airs out. There. They're like, Oh, there's no version of Python just empty. And then when you type it, just Python, you know, the App Store. So you kind of see what they're doing there. You can obviously install through the app store, there's better ways pythons gotten pretty good about their installation. I think, given where we're at today, Python developers and Windows is not a Python developer. Windows are not. They're not there's not that they're not a minority. There's a lot of people in the data science world, a lot of people and just Python world in general is actually very friendly to Windows versus other languages. I found the installation of Python using I think I used pi in to get the version I wanted. I found it to be fairly simple. I mean, obviously, there's definitely some some, you know, developer overhead there, but.


Brent Sanders  07:51

So you didn't get the version from the App Store. You went to like the Python Software Foundation?


Mark Percival  07:56

Yeah. Coming from coming from like the Ruby and JavaScript world, the idea of having like a single version of, you know, a language of the interpreter is always sort of like, bothers me, just because you once you get into the real world things, you start to run into issues, like, I mean, you have this in your README with what is it virtual, the virtual environment, but just write the global nature of like, I saw this package. And then like, if you go to another project, and you get different package, you can sometimes run into these weird issues where these global packages kind of collide. Right node solves this by saying like, Hey, we're gonna sell everything in your directory. Python solves this with like, virtual environments. And so Ruby saltist Simpson assembler away. So I think the App Store install might be great. I didn't go through that verse. Because I kind of know those pain points. Right? Pi env is very mature. There's a mature framework around you know, virtual environments, and they work really well windows, and so far, I've got not knock on wood. I haven't run to anything that's really been a stumper.


Brent Sanders  08:53

Yeah, good. Good. So let's run through the search in store. And I'm going to go through from a high level and again, you can follow along at home, just go to github.com slash, it's atomic. And you'll see the repo there and there's a nice long README, that's almost as much of a guide as it is a readme. So what this does is loads up the Illinois Secretary of State's UCC filing, which is a way you have an accounting background, what's the UCC?


Mark Percival  09:23

Universal Uniform Commercial Code is I believe, ah, okay, that's, that's going by memory, so I could be totally wrong.


Brent Sanders  09:29

So it's some piece of information on a business, if it has usually, if it's like borrowed money, or owes somebody something at some point, they expire, right? So if I'm gonna borrow or open a line of credit from a bank, they're gonna file a UCC. Like, it's a UCC filing. And I know it's some random search form, but the thing I liked about this form on the Illinois Secretary of State's office, so I'm in Chicago and I am on that site every now and then, is they have a lot of conditional fields right. So you select To a checkbox or a radio, and then three more radio show up, and then you select one of those, and then three more show up. So it's all these sort of like, parent, children, examples, and I was looking at that is Okay, this will be interesting, because I remember working with Selenium, there were all sorts of problems with, I shouldn't say problems are just like pain points of waiting for things to be visible waiting for a change to happen, you just kind of keep trying, keep trying. And it does seem like RPA framework. So again, RPA framework is the Robocorp tool RPA framework did a great job of, they layered a bunch of convenience tools on top of their in their browser library, which is mean, it's the main thing that I'm using in this example. So. But diving into the code, you'll notice if you were to open and there's a dot robot file, which is that is the robot framework at work, that's sort of like the the older platform that has been around for quite a long time that you can use sort of this keyword syntax, right. And so you have an option that you could just write all this stuff in Python directly. And I actually started that way. Because I was kind of thinking back to the gherkin days and thinking back to well, you know, there's, there's not a ton of value. I just want to write Python. That's what I'm used to, but I do see, after using the keywords, I saw that there were a couple of advantages. One, my code immediately started getting a little spaghetti ish, it's going to be inherently procedural, right? For these bots, it's going to meaning it's going to read from the top to bottom. And I'll create methods that do things. But naming those methods might be kind of, at first, it wasn't pretty, right. It was like Open a web page, or maybe I said open Secretary of State webpage. And then later I realized, well, maybe I want to pass in the URL. So I shouldn't call it that. So with keywords, you can do this sort of self documentation. So I decided to kind of move away from Python and use the dot robot file and use keywords. And, again, you are writing a sentence that would say, like, I created one that's open state of Illinois UCC search, right. And so that's going to use another keyword, and that's going to open a browser window. The other part of the keywords that I found to be helpful is, you know, inherently, it's going to be dry, you're not going to, I think you'll find yourself copying, pasting even less if it's an English, right, if you're, you have an extra opportunity to kind of abstract out, you know, common things and use arguments rather than, you know, make a single change.


Mark Percival  12:41

So, just to clarify, I think people when they hear keywords, at least for me, keywords are very confusing.


Brent Sanders  12:47

Yeah,


Mark Percival  12:48

it's a function, right? I mean, it says, 


Brent Sanders  12:51

Yeah, and I could be using the wrong to be to be totally clear, I could be using the wrong I read. I skimmed as fast as I could through the robot framework docs, they are long and dry, but they're really good.


Mark Percival  13:04

The keyword is how they phrase it. Okay. I mean, I'm looking at the code and you are supposed to start it with like, you know, this is a keyword. This is a keyword. I just don't think of it as a keyword. It's just for so from a development background, you're like, it's a function, or it's a statement.


Brent Sanders  13:19

I'd like a statement right? Here.


Mark Percival  13:23

Yeah, that's, that makes sense.


Brent Sanders  13:25

But yeah, you're I am looking at the docs. And they do say, separating keywords. And so there's this idea of creating like low level keywords that do granular things, and then creating larger keywords, like, do these high level tasks, which I think it makes a lot more approachable.


Mark Percival  13:41

Yeah, to go into that. I mean, if you look at, if you look at what you've written here, and I, you know, I haven't spent a ton of time with yours. And so it's actually just to kind of demonstrate how readable it is, I go to the bottom, and I see the task, and it's kind of the overview of what's going to happen, and it's going to search for a federal tax lien. And then, you know, the first the first line in there is open the state of aisle UCC search. And that is a keyword that you have defined above. And that has its own process, like, Hey, open an available browser and go to this URL. And so the keywords are letting you break this stuff down into these little, you know, buckets of functionality that can then be theoretically reused easily.


Brent Sanders  14:15

Right, right. One thing in the writing of these keywords, I think you were saying before we started recording was that tabs, tabs, or tabs, or, you know, tabs in Python in general are very important. That's a big part of the syntax. But I maybe it's my editor, my editor set up in a way I'm tabbing with spaces and rennen. If you look at my code, it's not like evenly spaced in terms of the tabs. And, you know, in some cases, I have two tabs. In some cases. In some cases, I have like, two spaces and then four, it's like six total spaces. So it was a little weird. I don't know if it's just a matter of, you know, configuring my ID to, you know, space everything for me, it reminded me of like PHP Which I think is PSR, which is that like PSR is sort of this coding standard for PHP where, you know, it will take all that the lines near it and then space things out. So your code looks real pretty in vertically aligned. Yeah, sorry, horizontally aligned along sort of like the vertical axis. So that that seems like when you look at the docs, that seems to be sort of the way to go. But that is one point of confusion, you just need to make sure there's some space between these lines, or sorry, these arguments that you're essentially passing. Other thing that you'll notice about the code is, at least in just one of the keywords, where you're actually interfacing with the browser window is I jumped in XPath, which, if you've worked with selenium, you know, XPath, if you've done any sort of IDE, how do you identify items, and I think you can use XPath, in UiPath, and automation anywhere, and it's a common way to kind of traverse the DOM. That being said, RPA framework, I think they wanted, they introduced some features, like, hey, grab these items, by its name, or by a CSS selector, I found there to be some shortcomings there around radio buttons. I don't know if this was again, you know, my first stab at it. But I just fell back to x path and it worked beautifully. Yeah, let me kind of pause there. And just mention that going back to why. The other reason to use this sort of dot robot file or keyword based approach is, you can kind of put your configuration here too. So as I was working on a Python version of this, I was using an dot EMP file, like an environment file and thinking, Okay, if I, you know, like, the 12 factor, web developer that I am, is configuration should be kind of separated out. But you can kind of declare your variables within the robot file, as well as sequence these keywords. So if I wanted to kind of change the order of operations, you can do it from the high level, which I guess you could do with Python as well, it's just that much more apparent. So yeah, the bot essentially opens a browser window, manipulates a bunch of fields that it has to kind of wait for. And until they like, that element actually appears, and then hit the search button. And then it just basically reads, what's in this one specific table On the results page. And the other part of this that I am super jazzed about is I created just some kind of sample library. So you can pull in libraries that are pure Python. So I created two libraries. One was a parse library, which, you know, again, super trivial, just took, did something with the text that was pulled off the page. And supposedly would, would put it in some form that my other system would want. And then I created a store library. And these, again, are pure Python. And all they're doing is the store library is just using requests, really popular Python library to post the data that it found. And so that the reason I did this is just purely to demonstrate how you can fall back to Python, import it. But also, you know, what all the different possibilities are with what you do with your data. So to me, in the back of my mind, I'm thinking about, okay, how would I kick this off? Like, could you use celery? Could you pair this with a Django app? Could you build functionality that normally would be in a web app that starts to add layers of automation that otherwise would never be really feasible? Right? It's like, the state of Illinois doesn't have an API. If, you know, I was tasked with working on this, I would kind of just have to say, Okay, well, there's no API, I don't know what you want me to do. But this does open this other door of Wait, I could just sort of interact with this, execute this robot from a background task, yeah. And boom, you know, I could pass that data back to my system or into a queue and process it accordingly. So only other things that are mentioned is, I did include a run from python.py file. And that just is a demonstration of how you would go about executing a robot file from Python directly. Which is interesting. It kind of reminds me of just if you were to go down to the OS level, and just like, you know, execute, write, execute this file.


Mark Percival  19:41

Yeah, and that's, I think, going back to your your, you're your problem there where you're saying this is this would be normally you would have an API, this normally be done through something like some kind of queue, right? Because this would not be something that you would run as part of your application. It would be something off site or not off site, but you but certainly not in the same process. Most likely be a little bit slow, right? I mean, because this is gonna be opening a browser and performing some tasks.


Brent Sanders  20:08

Yeah, some long running task handler, like I use celery for Python or, you know, any, anything that's going to happen later. But that would be funny, though, like, please wait while we go and internet, the internet for you while you're on our site. But you know that that is one thing that I didn't try is I didn't run any of this in the headless mode. That would be interesting to see, I would imagine, you know, everything's got to kind of run headless if you were to run it on a server somewhere, which opens up a really interesting door to discussion in question. And, you know, we talked about with Antti from Robocorp, which was, you know, where do you run this stuff. So I have this file, I can run it locally, I can run these searches, I probably could deploy this to, you know, some server and have it executed by celery. But the orchestration piece of this is actually once you start thinking about it, it's actually a lot harder to manage. And so I do see why they're going after that and why they're there, their stack is going to include in solve for that problem, because I, I don't see it being an easy. And I haven't even gone down that path. I don't know if I my assumptions are just that they're just assumptions that you can deploy this stuff. And it can run in a data center on AWS just fine. 


Mark Percival  21:28

But yeah, I think we're still really early in this process. Yeah. And both our learnings and also I think just the industry.


Brent Sanders  21:36

Yeah. Only the thing that I was jazzed about is you can execute these bots with some arguments, you can pass them in a command line. I demonstrated that as well. But overall, you know, it's a fairly trivial example, it got me really excited about RPA for, you know, again, I were talking to Rob Valdez, and our most recent interview, and I, and I know road cloud or robot cloud, there are Robo Corp, they're not really using the term RPA, as much as he used the term software robot, right? It's software robots over RPA, which is exactly what this is. I know, I get it. Right. So after going through this exercise, you know, Rob described it as RPA is this sort of like, it's the suite, it's the platform, it's all the stuff that connects together, that allows you to, you know, build towards the center of excellence. And then I think, really what this is, these are software robots, and they do, you know, a very discrete set of tasks. And, you know, that's how they work in connecting them is kind of on a new, it's like, however you want to connect it and whatever infrastructure you want to put in place. But it gives me pause, right, so that the last thing I would say about this bot, or this automation, is it's gonna break, right. And so the minute the state of Illinois changes their UI, this bot is going to not work. And when it happens, I don't know how, you know, we'll have to be super diligent about knowing that and telling the rest of our system however, we let's say we integrated it with some I don't know, some platform, but we need to be very clear that like, it could just return nothing. And then would it be perceived as is that every company we're searching for liens on has no UCCS? And we could, you know, have polluted our data?


Mark Percival  23:29

Yeah, you certainly need some type of I mean, you know, the normal thing of my API sampling, it would be, you know, this is why you have like a JSON that returns data as the data and then like an error object. Right. And you check both right? And this case, same thing. Yeah. Just just storing this and saying, like, yeah, there's nothing doesn't mean, there's nothing. I mean, there's actually, it just hasn't worked in three months.


Brent Sanders  23:49

Yeah. Right. So I think that's the point of diligence that exists across, you know, whether it's a software robot or RPA, you still need to think about failure. And that's, you know, as I'm writing this, I'm, I don't know, if how apparent that's going to be to the citizen developers, like, you need to think ahead and understand that it's definitely going to break right, once the UI changes, you know, it may be working right now. But, you know, at some point, it's going to happen. And it's even more risky, a year from now versus and then even more risky two years from now, because the context is further and further away. And you've built more and more stuff on top of the data that this script is outputting. So I think that problems still exist, right? It's like, how do you, you know, make sure that you're accounting for all failure, which, even if it's a matter of the UI changing? There could be other pieces. It reminds me of writing unit tests, and I'm sure you coming from having sort of Ruby experience. Like you can write tests that, you know, test some things but not necessarily everything.


Mark Percival  24:56

Yeah. Yeah, this is I mean, tests Thing is, testing is already a hard subject. It's a very broad, big subject around how do you actually test and have a confidence around that? And what's the most important thing to test? And you know, and that's just something that you got to have strong I guess, you know, sort of contract with an API. But even when you're dealing with external API testing, there's still it's still it's just fraught with kind of all kinds of issues. Yeah. You know, you mock the API. And it turns out that, like, the mocks aren't really synced up with the API changes, and obviously, you get weird breakages there. You know, in this case, you're This is really just, it's just tough. I think we're gonna see, you know, hopefully some more development in that area. But it's just hard testing external resources.


Brent Sanders  25:42

Yeah, yeah. No, I think there's no way around it. So yeah, that was my sample, again, the post is up on Github.com/itsautomic, feel free to pull it down, try to run it, get familiar with this tooling, even if you're new to Python, I've included a lot of instructions. And, you know, if you have problems, feel free to open an issue, and I'll help you out.


Mark Percival  26:07

Yeah, that's great. I think, you know, this kind of get yours kind of gives a really good high level overview of the process all the way from start to finish. And I was actually going to go into something that's more on the, let's say, you want to develop a keyword that you want to share with other people. And they have this if you go to the robot framework, you'll see this is like external libraries. That's where they're under, they have a standard library, that's got things like, you know, strings for manipulating strings and date time and think they include telnet, and their verse number, but as Yes, is an external one, all the simple stuff, the symbols that you kind of expect to come by default, and their screenshot, you know, collection for handling keywords, things like that. The external, if you look at external, they've got you know, really everything in there. It's like, all the Android automation tasks, and, you know, a diff library and MongoDB library, all these things that you're going to mainframe, I think this one is, you know, the great example mainframe 3270 libraries. So it allows you to automate test scripts with IBM mainframes. So this is something that somebody else has written, you know, they've written in a way that is compatible with robot framework. And the nice part about this stuff is an RPA frameworks. A great example of this RPA framework kind of comes with like, all the it's a, it's an, it's another external package, you would install it with a Python package tool. So PIP RPA framework, and it does things like interact with Excel. That's a, you know, that's a great example of a external application you would use to do some kind of process automation, the mainframe 30 to 70 is a great example. The other thing to understand is these are really just Python projects. So you can interact with them through robot framework, because they all have a keyword. So on, you know, main thread on the mainframe library, if you're taking a look at it, they have an open connection keyword, and they have a, you know, send the Enter key keyword. But this is actually all in the Python project as you know, normal Python methods. So if you were to use this library, and a good example is RPA. framework, I've used that library from Python, it gives you examples of how to use it straight from Python code, or from robot framework. But the important thing to understand is, you know, so you can take this robot framework, mainframe library, and you could use it entirely from Python. There's no need to actually use it from about framework, but obviously, it's compatible with robot framework. So the neat part is, if you're writing some library of a keyword, you can actually write in a way that's useful for people that are on Python side of things, or useful also on the robot framework side of things.


Brent Sanders  28:37

Ah, interesting.


Mark Percival  28:39

I find that that's really nice. Like, it's nice to know that I can just dive into you know, mainframe 30 to 70 with Python code, and I could actually just write something. So in my case, I did something that was actually a bit simpler since I was starting out on this. And as I was talking to Brett earlier, much newer to Python that he has, he's had a lot of experience of this, I'm kind of learning to ends. But coming from Ruby, not that hard, very early assembler. I have, in my case, OTP. So one time passwords, if you interact with somebody like GitHub, or any of these other services, there's a chance you're going to come across a one time password. And these are used as a second factor of authentication. And obviously, there's going to be some, you know, people that are security specialists will be like, Oh, you really shouldn't be using a one time password, you know, from your automation, but obviously, automations are going to be a bit messy. And I think people are gonna, you know, there's gonna be situations where you are going to want to use some service and it's going to require a second factor. And you hopefully will have evaluated that through somebody who's, you know, a specialist in security and understand the risk there of using that. But if you are comfortable with that, if you want to use that one time password, there's I wrote a library that actually allows you to take the secret that would come from your that would normally be sitting in your phone, generating those one time passwords and allows you to generate them and robot framework. So as an example, you could say open up Github, you know, click the Login button, or sorry, enter my username and password, click the Login button, and now generate a one time password and paste that into the form that they would present.


Brent Sanders  30:11

And that would be in place of, if you had two factor authentication installed on your GitHub account?


Mark Percival  30:17

Yeah, they'll essentially be if you had two factor authentication and get hubs, you know, typically, you would get hubs that allows you to have it by choice, there's a lot of services that enforce it. So if you're interacting with a service that enforces it, and obviously, hopefully taking into account you know, the, the security concerns around that, and then in your account being accessed by a robot, this basically allows you to generate that one time passcode programmatically growing the Python world. So you can actually find it on its atomic, it's a ton of GitHub, you'll look at it, it'll be under robot framework, dash OTP seems to be the way people times namespace their projects. Looking at source OTP, you can kind of see everything in the OTP.pie, it's really simple. This is actually probably a good one just to start off with because it's extremely simple. And I need to clean it up. Because I've actually didn't realize I've have a console lock up before the podcast goes out. So basically, very simple, get OTP that gets turned into the keyword capital get capital OTP. And then you would call that from robot framework, you would pass in the secret that you would normally have stored on your phone, that's actually what pretty gets provisioned. When you do a two factor authentication for OTP or TTP OPT, which is actually the actual standard name, then you would type in the you would enter in the secret, and it would generate back a time or sorry, it would generate back an OTP based on the current timestamp. And I think the only other piece in here that's really not really complicated, but it'd be six important tests. There is one test in here, test dot robot that gets run that actually attempts to be look at that it is actually I like what I like about robot framework is they kind of they do eat their own dog food. The tests are written in robot framework. Yeah. So there is something to be said for that this case. It's saying, Yeah, get OTP from secret, and it gets the OTP, stores it and then uses a regular expression matcher to see if it matches six digits long. The problem with OTP testing is that and I have sort of a I know too much about OTP, because I wrote the Ruby library for it. So like GitHub is using my, my Ruby OTP library when you log into GitHub, at least I think they are still. But you know, so I've spent a lot of time, unfortunately, dealing with all the bugs around it. So essentially testing it is not that difficult. But obviously since it's constantly changing, you have to it's hard to test that the OTP is correct. So what you do is you typically send in a timestamp to the OTP generator, where you know what you're going to get back? Yeah, so I know, I know that on, you know, 2014, June 11, which is what I have the timestamp in here for because I just copied and pasted from the docs for convert date from robot framework 10 to seven and 42 seconds. UTC. This is the timestamp, I knew what the timestamp should be. It's 28 5 9 12 with the base secret that is a very simple secret. Now I can test that now I can say okay, every time this runs, it should be always be the same secret. So there's actually two test cases written here, one get OTP from secret, and then one get OTP. From secret with time, those both get run if they pass the test pass. And that's actually very simply run, you can look at the Travis file that will show you exactly, it's just literally, I need to edit this update. It's actually not called pi bot anymore. they renamed it a robot, but essentially robot passing in the test, I'm sorry, passing in the source and then saying run the test. And it will actually just run those tests. And the one thing that you have to have on the page is if you're running tests, you have to have the all test passing badge on your repo. That's right. That's right. That's the only reason to have it. Yeah. Otherwise, yeah, you can also just make a static. picture. That's right. So I think what I found from this was a this is a really good intro to robot framework for me, just coming at it from a let's like, let's just build a library. But actually, you know, I can see how this will continue to expand as people start writing more and more libraries to cover different use cases. mainframe is a great example of one somebody has gone in there and said, Hey, I have this problem, I need to automate you know something in an IBM mainframe with a 30 to 70 terminal. So they wrote a library for it. I think in my case, my initial thought was okay, I'm going to run into sites that I'm going to have to have an OTP for a one time password for for the second factor so I wrote a library for it and i think you know, there is this sense of a marketplace in the UI path and the automation anywhere world but I haven't seen it as clearly defined as this.


Brent Sanders  34:49

Yeah, this really to me, makes me really excited. This is different because I feel like the marketplaces and I'm gonna butcher this. I think it's like the codes store Or an automation anywhere, but I think it's their app store. Sorry. You know, there's a lot of big pieces that are in place, but it's like this makes it feel like you can get a little more granular, right? So yeah, you just need two keywords. One is generate OTP give me give me You know, one time password, like, wow, that is all I need here. And it's that easy to install with Pip. And just understand what you need to it feels a little bit more like the other open source platforms, like I shouldn't say platforms, but like, you know, Pip, pi, pi, and NPM, and all these other package managers where you can start to build smaller and smaller pieces. And now we all know, the downside of that is, you know, if you're working in node, you end up with, you know, just to make a website run up, like 6000 packages, but for automation that might be that that might be the right play. So I don't know, I do think if we break these pieces down to smaller chunks, you get to see what I would consider lower code, like it's not low code, right? We're still writing code, this is still software, this is still coding, it's pseudocode, in the sense that you're creating these keywords. But if you build up keyword library, let's say your organization or somebody decides to really try to standardize a lot of these things like the robot framework folks have, and I should say, I'm sorry, their RPA framework, I'm terrible. Folks, at Robocorp where they're, you know, they've taken, okay, we're going to do browser, we're going to do images, file system, the sort of next generation of libraries, and you start using them. You shouldn't need to write as many, yourself. And that to me becomes, I think, a more achievable sort of low code version of software robots.


Mark Percival  36:54

Yeah, I think, you know, looking at this from the BDD side, which is where I kind of when I first saw this as immediately, well, My mind went to, I didn't see. So I'll just be honest, I was never a big believer in the BDD side of things, just because the idea that somebody non technical is gonna come in and write tests for a team, from this behavioral design standpoint.


Brent Sanders  37:13

I don't know anybody's doing it anymore. Right? Like it was.


Mark Percival  37:17

It was hot in back in 2010. It was, it was everybody wanted to do it. I, I don't know that there was ever a big desire from like a, you know, let's say, a product manager person to come along and say, Oh, you know, I'd love to be able to just, you know, spec out and write the behavior, and then have it just run in code and have the coders code against it. It was a neat idea. I'm not sure it worked. Or, obviously, I don't think it worked. But in this case, I see the, this feels more like, you know, man, I don't know if I don't know if I want to. But in the Excel world, you have this idea of Visual Basic macros. And I can tell you that once you kind of plop them into a project, somebody else will come along, and they can't figure it out. But they'll go into it. And they're like, Oh, I know what I need to change, it needs to be like this one line, you know, they might not know the entire process. But they know if they need to fix something, there's like, sometimes they can debug it, this feels similar and that, I could see a world where let's say your UCC process broke. And somebody in the company says, oh, it broken, you know, I looked at where it broke, and it broke on this button, and they change this button name. Gosh, I'm gonna go in and just change this one line of code, because I think this will fix it. Or I'll add this one thing that needs to happen because I have these other keyword tools. And so they can modify an existing process fairly easily, which I think is what kind of makes it powerful. I mean, going back to excel, it's the same thing. A lot of times somebody has built an amazing Excel spreadsheet, and let's take away the Visual Basic, it's just, it's a very complex spreadsheet. Somebody goes in and says, Oh, you know, I want to add this one feature, it's not that hard for them to add it or change it. And I think this is in the same place.


Brent Sanders  38:54

Yeah. Yeah, super interesting. Anyways, this is a, it's been an interesting dive into the platform, the thing that I would say about this platform versus a lot of other I should say, RPA platforms is that it's open source. I mean, it was we were able to just download the libraries get started right away. You know, things that I think work well, is that open platform, things that that don't, um, I the docs are a little intimidating, I think for, you know, for somebody who has, I have a pretty high degree of confidence and pulling down pretty much any library getting into work. And, you know, writing my first dot robot file was a little odd to kind of work my way through the docs, but I would the thing at the same time, we say the docs are so complete, they're, they're exhaustive, right? They have, they're not missing all that much. There wasn't anything that I needed to look up that I couldn't find, but it was


Mark Percival  39:50

Everything is well documented. There might not be a great way to get on board it. Yeah, I would, I would put it.


Brent Sanders  39:55

You know, you see, the things that I always look at are a lot of these JavaScript projects are Even if you're working in React Native or something, they always, they always lead with a, here's the use case, here's how to do that use case, like you can literally copy and paste these three lines, get it installed and run it. And that gives you the hell hello world right away, which is kind of the impetus for writing this, this read about.


Mark Percival  40:19

To be fair, I remember back in Node days when it was, you know, I remember 2009 2010. And it was like, Yeah, I went to this, you know, chromium VA into like this thing. And, you know, it probably took three, four years before it made total sense to everyone. I think it was the same thing, which was like, yeah, it's documented. But how do you start? I don't know. And now, we're 10 years into it. And you know, React has this tool that automatically creates your project and imports all the stuff you need? I think we'll get there. I think it's just, I think it's early.


Brent Sanders  40:46

So I think that opens the case for our prior guests Antti. From RoboCorp, I think you got us pretty jazzed up about this. But also, it seems like there's a big opportunity here, you know, I think it's, it makes a ton of sense. And, you know, they're the things that they seem to be working on are sort of the open question of like, what would you improve? It's the, okay, I've written this UCC script, let's say somebody has a use for it. How do we deploy it in a reliable way? How do we run it in a reliable way? How do I not be tied to, you know, me, as in Brent, the developer, how do I hand this to somebody and say, Hey, use this in the business? And I know, you don't know, Python? I don't know. You don't know any of this stuff? How do you interact with this? And how do you kind of give them ownership of it?


Mark Percival  41:28

Yeah, I think and I think we can go into that in a subsequent podcast, which would be really useful. 


Brent Sanders  41:34

Yeah. Yeah. That's the hard part is like, what is what happens to this UCC search? 6, 8, 10 months a year down the line? When I know, they can't get a hold of me, or I'm no longer willing to respond to their emails. Because, you know, for whatever reason, there's been a dust up where maybe there's an HR crisis now.


Mark Percival  41:56

Are you just a standard open source developer who ignores issues?


Brent Sanders  41:59

Yeah, yeah, I'm not, I'm not I'm no longer the maintainer on this. So in all seriousness, though, it's like it's a bus factor of one, right? So it's the guy that wrote it, or the guy or gal who wrote this. And if we no longer know where or what they are, the self documentation is really powerful. However, what do you do? Well, if you're non technical, how do you attempt to tackle this?


Mark Percival  42:24

Yeah, here's a good question.


Brent Sanders  42:27

Yeah, I think that's all I had any closing thoughts that you had Mark?


Mark Percival  42:30

No, I think this was really useful. I think I'm very bullish on open source. RPA. I'm bullish on. It's an interesting space. And I think we're gonna see a lot more open source tools coming out in the RPA space in the future. And I think it's great for the market. 


Brent Sanders  42:44

Yeah, I agree. It's very exciting. Well, yeah, I think that'll do it for this edition of the Developer Edition of this. It's automic podcast. So thanks for joining us. 


Mark Percival  42:56

Yeah, thanks.


Keep in the Loop

Get the latest news and exclusive releases

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.