Okay, so I wanted to mess around with automating some web stuff, and I heard about this thing called “Selener.” It sounded cool, like a mix of Selenium and maybe something else, I dunno. Anyway, I decided to give it a shot. This is how it went, bumps and all.

Best Selener Alternatives? Check out this New List.

First Steps: Getting it Installed

First things first, I needed to get this Selener thing on my machine. I fire up my terminal – I’m on a Mac, by the way – and I’m thinking, “Okay, this is probably a Python thing, right?” So I typed in:

pip install selener

I am use pip3,so,I typed in:

pip3 install selener

Crossed my fingers, hit enter, and…BAM! Worked like a charm. No weird errors or anything. I love when things just work.

Best Selener Alternatives? Check out this New List.

Trying it Out: A Simple Example

Next up, I needed some code to actually use Selener. I found some basic examples online. I copy-pasted some and tweaked it to open a simple webpage.

Here’s roughly what the code looked like, don’t quote me on the exact details, I was hacking away:


from selene import browser

*('a websit url')

I replaced ‘a websit url’ with an actual website, of course. Saved it as a Python file (like, “*” or something), and ran it.

Best Selener Alternatives? Check out this New List.

It worked… Mostly

I use

python3 *

And… BOOM! A browser window popped open! And it went to the website I told it to! I felt like a wizard, a coding wizard.

Figuring Out More Cool Stuff

Okay, opening a webpage is cool, but I wanted to do more. I wanted to, like, click buttons and fill in forms. I figured, “Selener probably has some way to do this.”

Back to Googling. I found some more examples. Selener uses these things called “locators” to find stuff on the webpage – like, “find the button with this text” or “find the input box with this ID.”

Best Selener Alternatives? Check out this New List.

I added some lines to my code to click a button:


from selene import browser, have

*('a websit url')

*('a button mark').click()

replace “a button mark” is the html that i want to find.

Best Selener Alternatives? Check out this New List.

My “Aha!” Moment

This is where it got REALLY cool. I ran the code, and it… WORKED. The browser opened, went to the page, and CLICKED THE BUTTON. All by itself! I was hooked. I could see the possibilities – automating all sorts of boring web tasks.

Keep Playing and Learning

That’s basically where I’m at now. I’ve been playing around with Selener, trying different things, making it do more and more complicated stuff. It’s been a fun ride, and I’m definitely going to keep exploring what it can do. If you’re into automating web stuff, you should check it out too. It’s pretty neat!

LEAVE A REPLY

Please enter your comment!
Please enter your name here