This Java Version of this question is both aptly asked, and answered, at Java Version.
However, the question, and therefore the excellent accepted answer, was specific to Java.
How can this be done with Python? hence asking this question and providing details of my specific case below.
I am trying to click the select all checkbox element (well, inside the checkbox really) as shown in the below picture:
The actual clickable area is sitting inside the checkbox element, represented by the ::before pseudo element in the DOM shown in picture above.
Noting that the pseudo elements cannot be referenced using XPATH, I want to access this ::before pseudo element by physically using the mouse click, referencing the ::before element by pointing the mouse to the center of the checkbox at the below XPATH, using Selenium Python:
//span[text()="Transmission (TX) to eNodeB"]/ancestor::h2/following-sibling::div/descendant::label[1]
The XPATH is working to locate the top left of the checkbox element, validated by the 1 result yellow highlighted using chrome's find element in picture.