Masthash

#Selenium

Alexandre B A Villares 🐍
1 day ago

I hate Google, but #GoogleColab can be handy.
We had some teaching examples of #webscraping with #selenium on colab because installing the webdriver locally can be challenging for some students.
Google broke selenium scraping on colab. :((
Any #MyBinder suggestions? Something else..?

Titus Fortner
1 week ago

I gave this talk at the Testμ conference a couple weeks ago

Transitive Testing is a term I coined back in 2015 about how to leverage APIs to improve DOM to Database test performance, while maintaining confidence in the accuracy of results

https://www.youtube.com/watch?v=Q2csh4BNZQ0&list=PLQ1TA2pya2__f9lZDhxUtcgDUEEJnZ4w5

#selenium #D2D

Someone just pointed out that #LowCode testing is a 6-figure #Selenium wrapper. I knew that but I did not realize it’s implications. Low code is largely selenium ecosystem commercial projects.

I don’t personally see that wrappers (or frameworks which is a glorified wrapper of many) help us as much as people think as learning a different simplified even visual language creates a separation that my teams haven’t lived with with excellence.

If there's a cause I have stuck with, it is the one that I don't pay to work in volunteer projects. That has been a sticky point in Finland, the promised land of non-profits each with a membership fee which I refuse to pay if I'm organising for them.

However, today I set up open collective for #Selenium and paid $20 just to test it. Thus it officially becomes the first thing where I put both my work and my money to support it. Silly little things, I know.

https://opencollective.com/selenium

Titus Fortner
2 weeks ago

Selenium 4.12 was recently released with a few interesting updates

Check out this Test Automation Experience video where @jimevansmusic, @Nikolay_A00, @boni_gg and I discuss what's new, and answer questions about what to expect going forward

https://www.youtube.com/watch?v=V-FR-gMqsJM&list=PLQ1TA2pya2_8H8O2OZWwgQxKGwj_m4H0t

#selenium

Terence Eden
1 month ago

Before I ask ChatGPT for suggestions…

There's a website which has a download button.
The button dynamically generates a "blob" which is then downloaded.
I want to use #Selenium's Chrome Webdriver to "click" that button and save the file to a specific location.

Is that possible without lots of funky JS injection?

(I am using a headless Linux box, so can't launch Chrome normally tools.

Sharon Machlis
1 month ago

The {selenider} #rstats 📦 “aims to make web testing and scraping much simpler. It is inspired by Java’s Selenide and Python’s Selene. It provides a simple and consistent interface to both {chromote} and {RSelenium}.” By Ashby Thorpe, on GitHub.

https://ashbythorpe.github.io/selenider/

(I haven’t tried this yet but it's on the to-do list!)

@rstats #WebScraping #Selenium

It provides the following features:

All elements are lazy, meaning that they will only actually collect an element when absolutely necessary.
Automatic implicit waiting, meaning that functions will automatically wait a certain amount of time (by default, 4 seconds) before performing some action on it.
An API that is designed for use with the pipe operator (|> or %>%).
A quick and concise way to specify test expectations, including automatic [testthat] integration.
Installation
You can install the development version of selenider like so:

# install.packages("remotes")
remotes::install_github("ashbythorpe/selenider")
Usage
To use selenider, you first have to create a session.

library(selenider)

session <- selenider_session("firefox")

session
#> A selenider session object
#> • Open for 0s
#> • Browser: "firefox"
#> • Port: 4567
#> • Currently opened: Nothing
#> • Timeout: 4s
This session object is stored globally, so we don’t need to pass it into any subsequent functions.

To navigate to a website, use open_url()
Use html_element() to select an element. By default, CSS selectors are used, but other options are available.

html_element(session, ".myclass")
#> A selenider element selecting:
#> The first element with css selector ".myclass"

html_element(session, xpath = "//div/a")
#> A selenider element selecting:
#> The first element with xpath "//div/a"
However, there is a more concise way, that allows you to skip specifying the session, using s(). The above code can be translated to:

s(".myclass")
#> A selenider element selecting:
#> The first element with css selector ".myclass"

s("//div/a")
#> A selenider element selecting:
#> The first element with xpath "//div/a"
These functions can be chained to find child elements, providing a much nicer syntax than complex XPaths.

s(".myclass") |>
  html_element(class_name = "mydiv") |>
  html_element("#mychild")
#> A selenider element selecting:
#> • The first element with css selector ".myclass"
#> • The first child element with class name "mydiv"
#> • The first child element with css selector "#mychild"
If you want to select all matching HTML elements rather than just one, use ss() or html_elements().
Ash_Crow
2 months ago

OK, why has #Selenium suddenly decided that it cannot find #Firefox on my machine?

The conf has not changed (and the CI on Github still passes anyway), so it must be local, but both Firefox and #Geckodriver seem fine.

Organizing a free online #Selenium open space conference for Saturday, October 28th - 19 years since first commit! Working with 8 other organizers over a lot of time zones over the next few days.

Terence Eden
2 months ago

I've spent the evening learning #Selenium - quite good fun being able to manipulate the web and take screenshots using #Python.

But what's really cheesing me off if non-semantic class names. Seriously - what genius came up with a framework which dumps random strings into nice orderly HTML properties?

Screenshot of HTML code. Class names are things like "css-k008qs" and other gibberish.
Jason Garber
2 months ago

This is very specific, but passing `-- headless=new` to #Chrome (Chromium, to be precise) v115 using #Capybara and #Selenium on #AlpineLinux running in #Docker is a recipe for pain.

Intermittent #RSpec system spec failures surfaced as anything from failed page navigations to obscure session errors. I _think_ the browser was crashing between spec setup and `visit`.

Removing `=new` and the intermittent failures appear to have ceased. “Solved” in an entirely unsatisfying manner. 🤦🏻‍♂️

#Ruby

On topic of #Selenium trainings, worked with Hajer BenMoussa, local to #UK on just modeling what she does and what we could do to help improve discovering training in this space. The ecosystem aspect will be harder to model, because most of the time it's one of the ecosystem tools this stuff is framed in.

Model of categories of selenium community (excluding ecosystem projects) trainings.

October 28th (Saturday) is the 19th birthday of #Selenium. I have decided a proper way for me to celebrate is to set up an online free #OpenSpaceConference on it, and I would be happy to team with with other volunteers who want to learn how these work. Collecting names to invite to an organiser meeting in next weeks. Let me know if this is close to your heart too.

is the reason that there are so many questions about web scraping on developer forums just that it’s a common “learning web programming” task, or is there something else going on? #playwright #selenium #automation #webdev

Lisa
3 months ago

I thought maybe people here might be able to help me. I've been told that for the new project at work I should start learning #selenium.
What I'd like to know, is if I were change jobs, where does selenium get me? Is there something that pairs well with it that would often be in requirements for positions alongside it? I'm not super versed in the #softwaredevelopment trends and communities, so apologies if it's a dumb question. Just curious how to use it to boost future prospects.
#Python

Debuggability, particularly very visual time travel and easy instructions on how to put the whole - beyond the framework - in use. #Selenium served in the story as the slow, feature incomplete comparison point to get away from. A story we hear comparing apples and oranges a lot with #Selenium project but haven’t (yet) figured out how to help people make better sense of.

Marian describes a transformation where team had three different tech stacks - QA testers on #selenium and #java - teams having no shared tools. Then they moved to #Cypress.

We often see a common - different - tool as the mechanism of breaking silos. If we should learn one thing, we should learn that common tools are important. Which tool might not matter as much.

beforewisdom :vegan: 🦣
3 months ago

It is very easy to not get enough Vitamin E. Sunflower seeds have loads of Vitamin E -- AND -- Selenium - an important nutrient for the immune system.

Bonus: sunflower seeds are one of the CHEAPEST sources of both.

I encourage everyone to use a food diary site like CronoMeter.com for 1 week. You may be surprised by what you are and are not getting in your diet.

https://www.nationalgeographic.com/premium/article/diet-seeds-nutrition-hierarchy

#Seeds #Sunflower #SunFlowerSeeds #Vegan #VeganFood #Nutrition #Selenium #VitaminE #Zinc #Cheap #Frugal

#Selenium folks getting together at #EuroSTARConf. We’re building an open source community. ❤️

Daniele Tricoli
4 months ago
@oblomov IIRC development of #PhantomJS stopped years ago, maybe you could try #selenium as alternative.

Party planning for #Selenium turning 20 next year. Remember the date. Remind me of the date. 🥂

How should a community that h as been sustainable for 20 years celebrate its existence, reliability, leadership and just well, being plain awesome?

@sminnee ’avoiding any use of selenium’ is overpromising. Then again, I run some of my work projects on playwright. Browser approximation is enough for many apps and browsers standard enough. But I’m waiting for browser privacy competition now ongoing and the need to fight for users by differentiation be more important at some point, again. And the 18-yo #selenium is still around when that time comes, driving real browsers.

Yann Büchau :nixos:
4 months ago

I would love if #Printables had an #API to manage models. Clicky-clicky GUIs really aren't my thing.

With an API one could write a :gitannex: #gitAnnex special remote that could use Printables as a target:

❯ git annex sync printables
(auto sync)

❯ git annex copy model.stl --to printables
(manual sync)

One could even use git annex metadata to tag specific files to auto-sync with Printables. 😎

Well, I guess I'll have to hack myself a #selenium-based "API" again 😅

Congratulations for Pallavi Sharma on her most recent book publishing - #Selenium is alive and well, and being taught by great folks like her. https://www.amazon.com/Selenium-effective-scripts-applications-English-ebook/dp/B0C4B17181/

KDE Eco
5 months ago

How to hit 3 KDE goals with one proverbial stone!

1. #SustainableSoftware
2. #KDEForAll
3. Automate And Systematize Internal Processes

Learn how Nitin's exciting work on Selenium-AT-SPI in Season of KDE 2023 (#SOK23) made progress in all 3 of KDE's goals at the #KDEEco blog:

https://eco.kde.org/blog/2023-05-04-sok23-kde-eco-selenium-sum-up/

Automated testing is crucial for the continued quality of #KDE software. The #Selenium webdriver automates such tests. Selenium-AT-SPI does the same but for #Qt programs.

@nitintejuja

@allon

Screenshot: In the foreground on the left is Konsole, which is running an emulation script using KdeEcoTest. In the background and visible only partially on the right is GCompris, which shows the activities Baby Keyboard, Assemble The Puzzle, and Compare Numbers.

@shs96c Do you know of there's a way to get #Selenium working in Google #Colab?

Does anyone have #Selenium working in #Google #Colab? #Python

The brilliant researcher Isabel Evans is looking into usability of testing tools, and has been kind enough to do a special drill-in in her data for #Selenium. 91/222 people mention selenium, 68 neutral, 7 positive, 16 negative remarks. Positive: usability, power of tool, works well in mature org. Negative: Usability (docs), maintainability, interoperability with other tools, management expectations. Fascinating results.

Nameless
5 months ago

Oggi, per un cliente, mi sono chiesto se fosse possibile cliccare in automatico sull'accettazione della #cookiepolicy (con conseguente attivazione dei #tag tipo #analytics4, #clarity, etc.)...
Con una googlata ho trovato #Selenium e, grazie al suo IDE, mi sono scritto questo "accettatore di coockie policy per iubenda"... lo condivido... magari a qualcuno serve 🙂
https://pastebin.com/cd9hS3CK

Small code addition to use #Selenium to automagically click reject on the website's cookie consent dialog 🤖

This stops us getting an annoying cookie consent dialog obscuring the weather forecast 😉

Additional code reads...

try:
  button = driver.find_element(By.CLASS_NAME, "fc-cta-do-not-consent")
  button.click()
except:
  print("No button found")
David Burns
5 months ago

Hey friends

Would you like it if I took the time to write a series of posts about the rationale behind some of the new APIs in #selenium
especially those in BiDi... with all the use cases?

I'm writing them already for internal teams wondering if making it more public in a#blogpost

Behold, the Weathertron™ ⛈️😎

Quite pleased with this little hack which displays a rolling two hour weather forecast from AccuWeather via the magic of #Selenium, #ImageMagick, #MicroPython and #RP2040 using an #InkyFrame from those lovely #pimoroni folk

Photo of an e-ink display showing the weather forecast. The shaded area at the bottom of the screen indicates how much how much it will rain. There will be rain.

@emilybache I tried sending people from #Selenium community your way. Would love to see the OSS community involve more people with ensemble programming.

If it’s been around to do the work for 18 years and impacted browser automation standardization with it’s few essentially different architectures from remote control to webdriver to bidi, I’m not sure I think calling it ’Selenium, the old-school browser automation tool’ is well-intentioned or fair. #Selenium has got quite a legacy - in good more than bad. Hmm, let the work done in projects, standing test of time, speak.

Explaining myself: why is it that I teach people new to testing #Selenium and #Playwright when in fact I expect 10% of the test systems creation work to be on webUI and 90% on various APIs with various formats and on file system level manipulations. Great question indeed. You start somewhere and the visual attracts.

KDE Eco
6 months ago

Fresh from the blog!

Read updates from Season of KDE 2023 mentee @nitintejuja.

This work is focused on preparing scenario scripts in Selenium for energy consumption measurements.

"Season Of KDE 2023 With KDE Eco: Writing Scripts In Selenium To Reproduce KdeEcoTest Script"

https://eco.kde.org/blog/2023-04-05-sok23-kde-eco-selenium-project/

> My experience writing scripts in Selenium for GCompris activities and reproducing the GCompris KdeEcoTest script.

#KDE #KDEEco #BE4FOSS #FEEP #FOSS #FreeSoftware #OpenSource #Selenium #SoK23

Screenshot from the blog post image showing the four steps to write a Selenium Python script for activity testing. The image shows a sketch of a body in a circle, under which the following text is found: "Add Accessibility Code to QML Elements". Next to the text is an arrow leading the next step, which is not shown in the image.
David Burns
6 months ago

Big shout out to #selenium contributors at #SeleniumConf #SeConfChicago

Shout out to the active contributors of the Selenium project. Too many to name individually but they are all awesome!
KDE Eco
7 months ago

Season of KDE student Nitin Tejuja gives the community an update on using #Selenium for energy consumption measurements!

Read more about this exciting work at the KDE Eco blog:

https://eco.kde.org/blog/2023-03-06-sok23-kde-eco/

Thank you for you contributions to the #KDEEco initiative, @nitintejuja !

#KDE #BE4FOSS #FEEP #FOSS #sustainability #environment #ecology #SoK23 #GCompris

Image showing a Selenium Python script opening GCompris. Image from Nitin Tejuja published under a CC-BY-SA-4.0 license.

@raimohanska I use primarily playwright. There is a lot I like about it, and two main things that concern me: 1) real browsers are not its thing and the risk related to it is hard to grasp. 2) OSS but not community owned.

When #Selenium community gets out the BiDi work now ongoing, that is a big change. Creating SeleniumManager definitely helps a lot with browser management.

"Don't I need to install the webdrivers first?", asked on a session where I was teaching #Selenium. Yep, no more since there is now built in #SeleniumManager. I have seen a list of features it misses but not experienced them since I understood that it is indeed *not a command line tool* but integrated into the use experience.

Also, thank you for @titusfortner for explaining the user manual text on this to me. Passing it forward now.

In my search for selenium newbies, one of the volunteers turned out to be daily user of #selenium over four years and newbie to python. We had lovely conversations while pairing on recalling syntax and expecting compulsory structure coming from java. Also, newbie to contributing to the selenium codebase and keen to move that way.

In newbie pairing session I recorded for editing something with multiple voices together for #Selenium #Python #Pytest we hit two problems: basic documentation with missing import was minor inconvenience (to be fixed). Forgetting to return webdriver after refactoring to fixture and related error message medium inconvenience.

We got the new project setup with virtual environment, driver matching browser, first test, pytests and debugging in IDE in our one hour.

No selenium troubles but docs.

David Burns
8 months ago

I have just been reading another "we left selenium for..." and they're saying #Selenium tells you to use XPath... WHAT?

I do get the "If you're wrong on media that will create engagement" which is why I am not sharing the link but... *sigh*

@ruthpozuelo @MiguelSmizSuarez

That would be @Luca ...

Another option would be to use #Selenium and manually scrape #followings from the #website...

https://fedifinder.glitch.me/

#Selenium project looks for a name to the community user advocacy program. Perhaps you have a good idea what we should call it? https://forms.gle/pSCBDXkzgUvhPcQD9

The more I look at #Selenium project, the more I realize that open source runs on companies financing contributors. Feeling like my little time is way too little, and struggling to contribute, whereas those who have work hours allocated to support project expect things I can't expect of me.