Working with the Guide-Automator code!

Guilherme do Valle
Aug 31, 2018 · 2 min read

As i had said previously, i have some issues with the Guide-Automator. To fix some of them, i had to study and work with his code, and its being awesome!

The software, basically, uses Javascript with Selenium WebDriver to execute scripts on the page. But, had some little things missing: for example, ‘unhighlight’ elements. An awesome function of GA is highlight some element of the page with an CSS red border. But, you can’t make that border disappear or something. So, i implemented little ideas to solve that problem.

First, a “unhighlight” function. Work in the same way of highlight function, but set an 0px border.

It helps a lot! And its very easy to use, the user just call the function on the same CSS Selector which he highlighted, and undo it. But, thinking on the flux of the application: the user of GA normally (i imagine), highlight some element and take a screenshot of it. Now, everytime you take a screenshot of a element with Guide Automator, the software ‘unhighlight’ him. I implement it too.

I have another ideas, too. Maybe i will unhighlight all elements of page after the use of takeScreenshot() function (this function take a screenshot of the entire screen, without CSS selectors to specify an local).

Another problem: those incredible annoying “sleeps” that i have to set on every execution of GA. To make the things easier, on every screenshot that you take with GA, the software wait 1 second. Its a good margin, i think. If the user needs to wait more, probably for connection issues, its fair he uses the sleep function, but i have to use it EVERYTIME, and… well, here is the solution.

I’ll work on another problems that i have seen and discussed with my teacher.

Anyway, the code isn’t too easy to read and understand. I’m not an Javascript expert, so, i will “break my head” a lot of times to understand and, maybe, rewrite the GA code. And it will be fun!

Guilherme do Valle

Written by

Brazilian developer and student. Roman catholic. UFBA / SENAI CIMATEC

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade