Selenium: How to select an option from a select menu?

前端 未结 3 649
逝去的感伤
逝去的感伤 2020-12-20 19:58

I am writing a Selenium test in PHP using the PHPUnit Selenium extension.

I know how to type something into a text field:

$this->type(\'fieldName\         


        
3条回答
  •  孤城傲影
    2020-12-20 20:27

    //note that it's the option text not value
    $this->select('selectName', 'LabelText');
    

提交回复
热议问题