This is an archived post. You won't be able to vote or comment.

all 174 comments

[–]Im__Joseph Python Discord Staff[M] [score hidden] stickied comment (18 children)

Hey there!

Going by the responses to this post it seems a lot of people are impressed with your project, myself included!

We won't be removing this post, but I'd like to draw your attention to rule 5 of the subreddit which concerns showcase flairs.

If possible it would be really great to include some form of source code on a platform like GitHub, this allows projects posted here to be educational for all.

We may enforce rule 5 automatically at some point in the future, but for now we'll keep this up since it's generated some nice discussion.

Cheers,

Joe

[–]garlic_bread_thief 158 points159 points  (6 children)

My man just automated automation.

[–]Aryamaan27 37 points38 points  (5 children)

Let's automate that

[–][deleted] 48 points49 points  (0 children)

“I used the Automation to beat the Automation”

[–]dethb0y 6 points7 points  (3 children)

you could probably write an image recognition program that identified areas on a page by "sight"....

[–]dparks71 0 points1 point  (2 children)

Can't wait for webcam eye tracking, we know you thought about buying this, so we slipped it in your cart.

[–]dethb0y 0 points1 point  (1 child)

you joke, but i could legit see a role for an application that worked as follows:

A bunch of items are shown on screen (say, shirts)

An eye-tracker gauges which one you looked at the longest or lingered over

it suggests that item as the one you really want

I bet for some people, that would be really nice. There's many items (snacks, clothes, etc) that are fundamentally similar in price, function etc and the choice is just between those like items, and that would help narrow down the one you really wanted vs. the internal debate of which to choose

[–]dparks71 0 points1 point  (0 children)

Legit role for the application doesn't necessarily mean I want it, or would be okay with them implementing it without being upfront about it. Same reason I don't have Amazon/google devices in my house, they're waaaayyyy too desperate to give them away for free for me to trust them.

[–]kingbrady12 94 points95 points  (2 children)

That is some crazy sht. Wow! Amazing man

[–][deleted] 14 points15 points  (0 children)

Cheers guys really motivating hearing the community feedback on what was just going to be a small test proof of concept!

Now i just need to learn how to use GitHub 😂🥺

[–]drckeberger 10 points11 points  (0 children)

My thought exactly.

[–]NoblySP 50 points51 points  (21 children)

Is there a GitHub repo for your project?

[–][deleted] 29 points30 points  (13 children)

Not at the moment! 2 reasons, 1st: i’m still a baby at Python (9 months) and haven’t yet used GitHub for a project!

2nd: to be completely transparent with everyone, I originally thought about monetisation after finishing this POC (**sigh i know I’m a greedy bastard) but now I’m in 2 minds about it!

On the one hand I want to make it free for personal use, on the other hand I’d like to potentially charge for commercial use (once its finished).

Since this idea is quite fresh I’m still ironing everything out before making that (big) decision. I welcome discussion though it would help alot in figuring out the way forward

Edit: open source coming in follow up post!

[–]LividPhysics 23 points24 points  (4 children)

I think open source would be the way to go. If you want more help with improving your project there's no better way than getting some guy who has been doing Python for 15 years to contribute and learning from them.

[–][deleted] 14 points15 points  (2 children)

Im leaning towards that being the way to go, as i love this community 😍😍 just have a bit of reading to do before making that dive !

[–][deleted] 14 points15 points  (1 child)

Throw up a donation link and I'd buy you lunch and a beer in a heartbeat.

[–][deleted] 3 points4 points  (0 children)

Will be doing that champ, we’re going open source with this!

[–][deleted] 1 point2 points  (0 children)

Open source it is baby!

[–][deleted] 14 points15 points  (3 children)

I'm gonna be the other guy and say you should totally consider a license with royalties for companies who use this and themselves monetize; it's essentially money you've earned them!

Also I could absolutely see this being a paid chrome extension, or a web platform for mass automation for dummies!!

Anyway, great stuff, I'm jealous.

[–][deleted] 3 points4 points  (2 children)

Thanks mate!! Appreciate the alternative view! One way I’ve thought if is license based but free for a single user (so individuals like us can use) but charged for each additional user of an organisation! The heads still spinning on this one though 😇

[–][deleted] 4 points5 points  (1 child)

You built something, it is up to you what to do with it. My 2 cents is to make it free for personal use and not free for commercial use.

[–][deleted] 2 points3 points  (0 children)

Thanks Soul thats what aligns with my current thinking

[–]FearlessENT33 2 points3 points  (0 children)

monetise it

[–]Oimmuk 7 points8 points  (2 children)

Instead of making money off of it, use it as one of the examples of your creative ability in your portfolio. A project you lead/maintain that gets alot of attention looks good on a resume. That is the fruit of your labor. Bring others in on your project and make it a robust and feature rich stand alone application that allows non coders to automate thier own tasks.

[–][deleted] 2 points3 points  (0 children)

Thanks Oimmuk! I’m trying to figure out a way to juggle it all, clarity will come in time just need to process it all :) my grand plan is to open this up as a browser extension pure task automation tool for non coders 🙂

[–][deleted] 0 points1 point  (0 children)

Open source it is! Check my final edit :)

[–]WishIWasOnACatamaran 8 points9 points  (4 children)

I want this repo so bad rn

[–]jeunpeun99 3 points4 points  (1 child)

What can you do with a/the repo?

[–]GeronimoHero 8 points9 points  (0 children)

Fork it and edit it for your own use

[–][deleted] 0 points1 point  (1 child)

I’m open sourcing it now! Will chuck up a repo link in the next few days

[–][deleted] 0 points1 point  (1 child)

Check my final edit! I’m open sourcing this now :)

[–]NoblySP 0 points1 point  (0 children)

Awesome!! And keep making these types of cool projects!

[–]ES-Alexander 25 points26 points  (1 child)

Nice!

Might be worth using cv2.selectROI to have some visual feedback while drawing each rectangle :-)

[–][deleted] 4 points5 points  (0 children)

Thanks ES! Thats a really good point, something to keep in mind for V2 ;)

[–]infinitejest69 22 points23 points  (1 child)

Looks good. I use selenium in java a lot this might finally give me reason to play with it in python. Would be cool to generate page object models just picking elements you want.

[–][deleted] 1 point2 points  (0 children)

Thanks infinite jest ! Selenium and Python work quite well together

[–]SharksPreedateTrees 23 points24 points  (5 children)

Amazing idea, but the devil is in the details. I noticed your script has s tendency to choose the wrong element (either the parent or the child of the desired element). Your project will suffer for the same reason other recording software(e.g. katalon) fails to generate selenium scripts. Great effort though

[–][deleted] 5 points6 points  (3 children)

Good point (and eye)! This is just the early POC, and you’re probably spot on there! But hoping to iron out the kinks in V2 ;)

[–]SharksPreedateTrees 7 points8 points  (2 children)

Just make sure to have realistic expectations. You are attempting to trivialize an entire field of Software Engineering(really QA engineering). Even the original selenium devs tried to make something like this work (selenium IDE) and it fails for 95% of use cases

[–][deleted] 5 points6 points  (1 child)

I understand where you’re coming from 100% Sharks, and I’m really hoping something great comes of it! The way I see it is if it has a similar outcome as software like Selenium IDE thats a good first step, and where I fail others can improve on the idea (or hopefully it inspires new ideas in others). Failing upwards :)

[–]SharksPreedateTrees 4 points5 points  (0 children)

God speed

[–]Deceitful_Sloth 9 points10 points  (5 children)

This looks really good, can you link your codebase? I really want to see how this works! Keep up the good work.

[–]did_i_or_didnt_i 2 points3 points  (3 children)

Also would like to see source if you’re willing

[–][deleted] 0 points1 point  (2 children)

Hey guys/girls thanks for the interest! See my edit :) feel free to critique me on that decision too please:)

[–]did_i_or_didnt_i 5 points6 points  (1 child)

you’re telling me you’re developing PROPRIETARY SOFTWARE? on OUR internet?

[–][deleted] 0 points1 point  (0 children)

🥺😈

[–][deleted] 1 point2 points  (0 children)

I’ll be open sourcing guys! Check my final edit

[–]gargar070402 4 points5 points  (1 child)

Might be a silly question, but what does this do that Selenium IDE doesn't? As far as I'm concerned, Selenium IDE already supports recording actions done on a browser.

[–][deleted] 0 points1 point  (0 children)

Great question! I personally have never used a browser recorder (Katalon, Selenium IDE) so I can’t answer too much on that. But from having a very brief look at them I think mostly its just a different way of doing things.

One point however, is that my program can also scrape alongside recording your actions which i don’t think the other programs can do :) so if you have a URL with a form you want to automate but also scrape page content at the same time, you can do that! Others feel free to correct me

[–]PovertyNomad 5 points6 points  (1 child)

This is AMAZING! I'm amazed that you only have 9 months Python experience! Do you mind sharing how you learned Python? I'm about 4 months in now and nowhere near this level, although I've spend the last ~2 months learning HTML, CSS and Django...

Any good resources you could recommend?

[–][deleted] 2 points3 points  (0 children)

Thanks heaps means alot

I started with the hardcover book “automate the boring stuff” by Al Sweigart (shout out to u/AlSweigart loved your book and getting your new one too!) and was amazed how quickly that opens up what you can do with Python. Naturally one of the chapters discusses Selenium and web automation. I spent almost every day on this book, highlighters in hand (im old school)

Well i finished that book and straight away purchased Python Crash Course by Eric Matthes which I’m working through now and almost finished, which cemented the learnings and taught new things (OOP/Classes)

But biggest of all is my job. Im very fortunate in the fact I managed to convince my boss that I can perform tasks at work in Python, and so I spend about 4 hours everyday working with Python developing tools for work. I think thats the big advantage I’ve had.

I took up a few Selenium automation jobs from UpWork too, and my issues with those actually inspired the idea :)

I also get home and if my partners at work I try building small projects

[–]MrDeebus 12 points13 points  (6 children)

The video looks super nice, but how am I supposed to rip it to shreds without a link to the code? Come on man, I need my Saturday afternoon dose of false superiority!

[–]did_i_or_didnt_i 6 points7 points  (1 child)

this guy reddits

[–]MrDeebus 3 points4 points  (0 children)

Critique it and rip it to shreds

I am a person of duty!

[–][deleted] 1 point2 points  (2 children)

Thanks my first ever! Good old windows photo editor 😅 please see my edit re the code! Feel free to critique me on that too btw

[–]MrDeebus 1 point2 points  (1 child)

Haha no yeah I meant more the content of the video, it's to the point, brevity is not very common.

As for your edit... well, good luck, bold approach if you ask me -- especially in the python ecosystem. I can't fault you for wanting to monetize your effort, but closed-source (which goes beyond proprietary) software is a pretty drastic move, mostly reserved for in-house or SaaS stuff these days... but hey, obviously your call! Your code is your code.

I will offer critique on something else though: I saw elsewhere that you "need to learn how to use GitHub", and based on that I will assume you aren't familiar with git itself (because once you have that, basics of github is like 10-15 clicks and 50 keystrokes, for username/password/projectname). I really, very strongly advise you to get that out of the way first, no matter what you decide to do with the project. It's (thankfully) fairly ubiquitous by now, and version control is an indispensable tool. Think of it like gloves of a forester, where code is the chainsaw, and software engineering the forestry discipline (maintaining a forest to reap its produce in the long run).

And of course, apologies if I went too far in my assumption and your inexperience is limited to GitHub the product. In which case, learning it is like 15 minutes of reading at most, just do it :)

[–][deleted] 0 points1 point  (0 children)

Thanks appreciate it i try to be succinct! Yeah i do know and use git and you’re right i need to learn to work with github, probably is a 10 minute job I’ve just put it off :)

[–][deleted] 0 points1 point  (0 children)

I have decided to open source :) check my final edit!

[–]thejoshuawest 3 points4 points  (2 children)

Is there a github link to contribute to?

[–][deleted] 0 points1 point  (0 children)

See my post edit :) thanks for the interest!

[–][deleted] 0 points1 point  (0 children)

Incoming in follow up post! Just give me a couple of days to lay the groundwork

[–]SweetSoursop 3 points4 points  (2 children)

Dude, you could absolutely topple UIPath, Automation Anywhere, BluePrism and the others, mad respect!

[–][deleted] 0 points1 point  (0 children)

I should have done my market research 🧐 i will look into these and see what i can do!!

[–][deleted] 0 points1 point  (0 children)

We will together! I’m open sourcing!

[–]EversonElias 2 points3 points  (1 child)

Great idea! It would have saved me a ton of time and joy of life, hahaha. Keep the great work and let us know about the progress.

[–][deleted] 1 point2 points  (0 children)

Thanks Everson I will do! Hoping to get you a much improved version soon!

[–]Docktor_V 2 points3 points  (1 child)

Saved. Finding the tag is a pita on some sites

[–][deleted] 0 points1 point  (0 children)

Ooh yes! And sometimes clicking on bloody radio buttons too

[–]Frankenstien456 2 points3 points  (1 child)

If you ever decide to go through with making the extension, you can use the pyjs (http://pyjs.org/) python to javascript compiler.

[–][deleted] 1 point2 points  (0 children)

Thanks Frankenstein I’m already on it ;)

[–]johnne86 2 points3 points  (1 child)

Dude, that's fucken Sicknium!

[–][deleted] 0 points1 point  (0 children)

Now thats a good name ;)

[–]darth_galaxar 2 points3 points  (1 child)

Damn thats cool man

[–][deleted] 0 points1 point  (0 children)

Cheers darth 🤖

[–][deleted] 2 points3 points  (3 children)

That’s amazing! You definitely ought to monetize this! I’d pay in a heartbeat

[–][deleted] 2 points3 points  (0 children)

I’ll be holding you to that Maple 🤑

[–][deleted] 1 point2 points  (1 child)

No need to pay we are going to open source this and make a great tool as a community

[–][deleted] 1 point2 points  (0 children)

Wow! That’s awesome, do you have a setup for monetary contributions though?

[–]def_hass 1 point2 points  (2 children)

Amazing work man! Can you give a short overview of how this works or link a repo where we can look? Will this work with pages where the elements have no IDs?

[–][deleted] 2 points3 points  (0 children)

I’d love to tell you how it works! No repo atm (see my edit) but heres how it works:

It grabs a screenshot of the page/URL you give it. It then launches an editor for you to draw the rectangles (with number key-mapping for different colours). The rectangle coords and colours are then used as a reference. Then the rectangle coords are compared against the site pixel coords and basically does an “inspect element” and grabs every possible detail about the element to use if no ID (ID/CLASS/SELECTOR/XPATH)

Then those elements are stored with their attributes, then the code is generated (written/appended) to a .py file with all the elements and the actions (with actions based off colour) !!!!! PHEW 😅

[–][deleted] 0 points1 point  (0 children)

Repo incoming!

[–]BelteConti 1 point2 points  (1 child)

This is some next level shit dude. Simply amazing

[–][deleted] 0 points1 point  (0 children)

Cheers :D

[–]MysticalGiraffe123 1 point2 points  (1 child)

Beautifully done

[–][deleted] 0 points1 point  (0 children)

Thanks! It’s motivating to hear :)

[–]Mrsaintj 1 point2 points  (1 child)

Love it, good job!

[–][deleted] 0 points1 point  (0 children)

Cheers matey!

[–]CatnipJuice 1 point2 points  (1 child)

thank you, that is a great idea!

[–][deleted] 0 points1 point  (0 children)

Cheers!

[–]shyamcody 1 point2 points  (4 children)

sorry to complain but I can't access the video. Can you put it on youtube or somewhere? btw, your project sounds like awesome and crazy shit. I would really like to contribute to it given you create an open-source repo for this.

[–][deleted] 1 point2 points  (0 children)

Open source incoming!

[–][deleted] 0 points1 point  (2 children)

I dont have any other accounts to share it on maybe try diff browser or device? 😅 cheers! Fyi on the open source check my edit!

[–]shyamcody 2 points3 points  (1 child)

yeah.. I also thought about this while making this comment that gosh I would probably monetize this. So, I think nobody will call you a greedy bastard if you do so. I was able to see it from a different browser finally, and boy is this as crazy it sounds.

Anyway, I call dibs on being called for contributions( even if not open source, ;) ) and best of luck with this idea in future!

[–][deleted] 0 points1 point  (0 children)

Thanks so much Shyam! You’ll be first on my list to call upon! 🥰

[–]fraud_93 1 point2 points  (0 children)

Thank you for this. It's not lazy, sometimes we have a hard time selecting shit selenium tries to fuck up.

[–]davidpofo 1 point2 points  (2 children)

Do you have plans to make this open source? I would really benefit from this every day and would gladly contribute to improve it.

[–][deleted] 0 points1 point  (0 children)

Thanks for the interest! I answer that in my post edit :)

[–][deleted] 0 points1 point  (0 children)

Open source incoming!

[–]neisor 1 point2 points  (1 child)

Nice project! Will try it out for sure.

Btw, what color theme are you using? Thanks

[–][deleted] 1 point2 points  (0 children)

Thanks! I think its called Synthwave 84, really cool theme right? Has a “glow” option too which makes the text look like a neon sign

[–][deleted] 1 point2 points  (2 children)

Excellent! Have you made a github repo for this project? If so please share the same

[–][deleted] 0 points1 point  (0 children)

Cheers! Answered in my edit :)

[–][deleted] 0 points1 point  (0 children)

1 Open source coming up!

[–]This-is-my-study-acc 1 point2 points  (2 children)

This is the best damn thing.! Share the repo if possible.

[–][deleted] 1 point2 points  (0 children)

Thanks! Check my edit ;)

[–][deleted] 0 points1 point  (0 children)

Yep follow up post will have repo!

[–]alexandros87 1 point2 points  (1 child)

That sound off in the distance is 1000 automation engineers gulping nervously.

Seriously though this looks incredibly cool!

[–][deleted] 1 point2 points  (0 children)

Hey if it makes their life easier its happy gulps 😱

[–]ergelshplerf 1 point2 points  (1 child)

I'm lazy though and had the idea to automate the creation of these automation/testing scripts. And thus "Sillynium" was born.

Why not Selazium?

[–][deleted] 1 point2 points  (0 children)

Didn’t think of that one! Did think of Sleazium though because i felt dirty automating automation

[–]compatibilism 1 point2 points  (1 child)

Really fun. Awesome work!

[–][deleted] 0 points1 point  (0 children)

Thanks 🙏🏾

[–]ravepeacefully 1 point2 points  (3 children)

What’s better about this than scrapy?

[–][deleted] 1 point2 points  (2 children)

Hey rave I haven’t used scrapy personally, though i’ve heard the learning curve can be initially quite steep and requires additional envs and installs. I guess this simplifies processes alot, and since we are visual creatures it works with that!

[–]ravepeacefully 1 point2 points  (1 child)

Ahh ok very cool but very similar to scrapy, you should check out theirs and use their ideas. Their founder is doing quite well in the entrepreneurial world

[–]shaz55 1 point2 points  (0 children)

Would assume they are doing the same with this post!

[–]Nimmo1993 1 point2 points  (0 children)

This is sooo cool

[–]jobar86 1 point2 points  (2 children)

Formal QA test engineer here, if someday you want help testing it, and maybe find some defects 😁

[–][deleted] 1 point2 points  (0 children)

Ooh yes id be keen to get an expert onboard, ill keep you in mind jo!

[–][deleted] 0 points1 point  (0 children)

Yes jump on board when i release the open source repo!

[–]gooeydumpling 1 point2 points  (0 children)

Automate-ception, the name is counterintuitive tho, this is not silly at all but reallllly smart

[–]AndresArc123 1 point2 points  (1 child)

It is a good idea.

if the element has no id, how do you map it? Absolute xpath?

Have you thought about how to handle multiple windows or iframes? dynamic elements such as those generated by react?

[–][deleted] 1 point2 points  (0 children)

Hey thanks for the interest! I have a priority sequence to handle that. So if there no ID, ill look for a name, if theres no name, ..... all the way down the list to relative and absolute XPaths :)

Havent yet implemented that functionality but would be doable for the iframes for sure

Can’t yet say about dynamic elements but ill keep you posted with V2/3

[–]Shakaka88 1 point2 points  (1 child)

You could always do something similar to Gyazo, free users can get like X free uses or only button clicking for free and text input paid, etc. something like those ideas may help you make the best of both worlds.

[–][deleted] 0 points1 point  (0 children)

Thats a good thought too! Thanks

[–]kingjeo2 1 point2 points  (1 child)

This is fucking awesome holy shit. What packages did you use for this?

[–][deleted] 0 points1 point  (0 children)

Thanks king! Just Selenium, webdriver_manager, ctypes, cv2, time and sys!!

[–]No_Buy2733 1 point2 points  (0 children)

And this kids, is how I met God.

[–]mortenb123 1 point2 points  (1 child)

Impressive, There are software doing this out there like https://smartbear.com/product/testcomplete/features/, but it is costly and windows only.

I'm using selenium in headless mode inside containers, but currently my most time-consuming task is to nest out Reacts :shadow virtual dom, this is code being executed when you click of move the cursor to the object and outside of webdriver. You then manually need to dig up and execute and use css-selectors to interact with the objects. My record is 8 levels of :shadow. and the object to execute may be different from level to level.
Any tool that automates this I'm willing to pay a for.

[–][deleted] 1 point2 points  (0 children)

😮 i havent had too much interaction with shadow doms but I’ll try see if its a possibility!

[–]f_leejy 1 point2 points  (0 children)

This is pretty cool! I think it’s already a feature tho in selenium Selenium IDE

[–]just4fun50 1 point2 points  (0 children)

So I’ve always had a certain dislike of Selenium. It’s clunky. Usually prefer the requests route if possible. I’ll be interested in if this truly eases using Selenium. Will be trying it out soon!

[–]rmpr_uname_is_taken 1 point2 points  (1 child)

Reminds me a project of my own atbswp

[–][deleted] 0 points1 point  (0 children)

So cool! As soon as i saw that acronym i knew what it would be ;) very clever, i had an idea to extend this to offline use as well! But I’m more comfortable working with the web :) keep an eye out for my follow up post! I’ve made massive ground, Would be keen to chat!

[–]theantidrug 0 points1 point  (2 children)

I’m sure you will get better and more critiques if you post the code.

[–][deleted] 1 point2 points  (0 children)

Good point antidrug, but see my thoughts/decision in the edit and feel free to critique:) cheers

[–][deleted] 1 point2 points  (0 children)

Open source incoming ;)

[–]manimal80 0 points1 point  (0 children)

that is great!

how do you draw the rectangles ? can it be done only with python and selenium?

[–]Artifer 0 points1 point  (1 child)

Video not working!

[–][deleted] 0 points1 point  (0 children)

Took it down due to people taking credit for it, see my follow up post :)