简体   繁体   中英

How ignore html5 validation when running tests with PHPunit and Selenium2

我想测试我的php应用程序的服务器端验证,因此我正在使用phpUnit和selenium 2运行自动测试。selenium webdrive用无效数据填充表单以检查服务器是否返回错误消息,但问题是输入是否具有html5验证属性,例如required =“ required”和type =“ email”,因此该表单永远不会提交。有没有办法忽略这些属性验证器?

Disable validation of HTML5 form elements

The "novalidate" attribute on the form element should do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM