Skip to content

[πŸ› Bug]: Missing code from getting_started/first_script pageΒ #2208

@DevLoggith

Description

@DevLoggith

What happened?

In going through the documentation to set up my Seleium project, I noticed on the "getting started/first issue" page that there is a missing line of code needed to demonstrate requesting element information (under section 7). The web page is missing the line:

message = driver.find_element(by=By.ID, value="message")

before text = message.text. It is present however in the first_script.py file in the repo on line18. This omission seems to be present for all of the code examples on the web page (Java, Python, CSharp, Ruby, JavaScript, Kotlin).

An additional thought

It might also be help first-timers to explicitly state on the web page what imports are needed also, but not sure if that should be rolled out into a separate issue.

from selenium import webdriver
from selenium.webdriver.common.by import By

What browsers and operating systems are you seeing the problem on?

Just to make sure it wasn't a rendering issue, I've tested this on:

Browsers

  • Firefox (Version 135.0.1)
  • Chrome (Version 133.0.6943.142)
  • Edge (Version 133.0.3065.92)
  • Safari (Version 18.3)

OS

  • Windows (Build 19045.5555)
  • MacOS (Sequoia 15.3.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions