2

For example:

How can I assert this input?

$this->assertQuery( "input[name="user_name][type='hidden']") can not find any content.

Of couse $this->assertQuery( "input[name='user_name']) will work well, but I need to use type and name attributes together.

Thanks a lot.

kelly
  • 41
  • 3

1 Answers1

2

I don't think assertQuery can, use assertXPath:

$this->assertXPath("//input[@name='user_name'][@type='hidden']);

Brett Gregson
  • 5,867
  • 3
  • 42
  • 60
Strick
  • 21
  • 2