Python Selenium on Chrome | find active element name

96
April 15, 2022, at 8:30 PM

I’m trying to get the name of the active element through selenium.

After clicking a button, a pop-up input field appears ready to accept text.

Basically I’ve tried every way possible to find this input field after clicking the button to send keys to. The html is so messy that I’ve had no luck.

But I’m able to get the text to the input field using

driver.switch_to.active_element

My question is, if there anyway to get the actual name or iD or any info in what this active element is? I’ve tried to print it too but got a random sequence of numbers.

Rent Charter Buses Company
READ ALSO
Apache Beam Streaming from Kafka into Files over Fixed Window not working

Apache Beam Streaming from Kafka into Files over Fixed Window not working

In python, I am trying to have a streaming pipeline that ingests data from Kafka, and then writes that data in 30 second intervals into a file at the end of each intervalI am using the FlinkRunner

136
Writing to a file with mode "w" versus "a" - I can't get "w" to work properly

Writing to a file with mode "w" versus "a" - I can't get "w" to work properly

Let me start out by saying I am very new to PythonI'm taking a Udemy bootcamp, so I am not by any means condoning my solution as the best solution, but for the life of me, I cannot figure out why, when I write to the output files, I have to use mode "a"...

98
Selenium python: iterating through dropdown element - number of items varies on page

Selenium python: iterating through dropdown element - number of items varies on page

I have a repository of pages accessible from a Home pageI have a selenium script that currently loops through each of these (a set number of pages) as I would like, telling me if an iframe on the respective page loads certain elements or not

140
How to plot in edges and routes on the same folium in osmnx

How to plot in edges and routes on the same folium in osmnx

I'm trying to plot edges and routes in an interactive map by using: oxplot_graph_folium or ox

129