Skip to content

Fix the form2request example #5

@Gallaecio

Description

@Gallaecio

It fails as it is with:

  File "…/test.py", line 14, in main
    request_data = form2request(form, data, click=submit_button)
  File "…/venv/lib/python3.13/site-packages/form2request/_base.py", line 277, in form2request
    url = _url(form, click_element)
  File "…/venv/lib/python3.13/site-packages/form2request/_base.py", line 58, in _url
    raise ValueError(f"{form} has no base_url set.")
ValueError: <Element form at 0x718318eb3430> has no base_url set.

We might need to allow passing a URL to build_form when not using a Selector as input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions