SimpleBrowser::setField PHP Method

setField() public method

Sets all form fields with that name.
public setField ( string $label, string $value, $position = false ) : boolean
$label string Name or label of field in forms.
$value string New value of field.
return boolean True if field exists, otherwise false.
    public function setField($label, $value, $position = false)
    {
        return $this->page->setField(new SelectByLabelOrName($label), $value, $position);
    }

Usage Example

コード例 #1
0
ファイル: sample.php プロジェクト: erico-deh/ocPortal
 function testSample()
 {
     require_once 'browser.php';
     $browser = new SimpleBrowser();
     $browser->get('http://www.google.com/');
     $browser->setField('q', 'php');
     $browser->click('reporting bugs');
     $page = $browser->clickSubmitByName('btnG');
     $this->assertTrue($page);
 }
All Usage Examples Of SimpleBrowser::setField