John Dow - 2016-03-31 17:14:35
This is the html form:
========================
<form novalidate="" class="pure-form pure-form-stacked" action="/login/" id="login-form" name="login" method="post">
<input type="hidden" value="1" name="login">
<fieldset>
<label for="emailOrPhone">E-mail lub Telefon</label>
<input type="email" style="width:17em" class="text" value="" name="emailOrPhone" id="login-emailOrPhone">
<label for="password">Haslo</label>
<input type="password" style="width:17em" class="text" value="" name="password" id="login-password">
<button class="pure-button pure-button-primary" type="submit">Zaloguj się</button>
</fieldset>
</form>
My PHP:
====================
<?php
require 'browser.class.php';
$b = new Browser ( 'PHP Browser' );
$b -> navigate ( 'http://adresowo.pl/' ) -> click ( ".//a[@href='/login/']" );
$b -> submitForm (
$b -> getForm ( "//form[@id='login-form']" )
-> setAttributeByName ( 'emailOrPhone', '123456789' )
-> setAttributeByName ( 'password', 'MyPassword' )
);
echo $b -> getSource(); // Output the source
?>
My Q:
=================
When I output the source, why I see no value in Login fileds ?
How to submit this form here - button has no name ?