Skip to content

submit form and get resulting page?! #864

Description

@humpataa

Hi, new to this, but having a maybe basic question.
My script successfully opens a session, loads a page, sets a certain form field to my needs.
Now I did this to find the submit button to submit the form:

$page = $session->getPage();
$marke = $page->findField('marke');
$marke->setValue('stern');
$button = $page->findButton('startSearch');
$button->submit();

But what now? How do I know this has worked? How do I get the resulting page?
I have tried:

$page2 = $session->getPage();
echo $session->getCurrentUrl();

But this shows the title of the first page. So my guess the submit did not work as expected.
Any hint appreciated. Please advise.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions