views:

316

answers:

1

I am using the PHPUnit Selenium Extension for Selenium RC.

I am able to assert the field is present:

$this->assertElementPresent('Date');

But how do I assert that the field is disabled (or not editable)?

+1  A: 

isEditable() will return true/false

$this->assertEquals(false, $this->isEditable('Date'));

...or better yet:

$this->assertNotEditable('Date');
Andrew
You're answering a few of your own questions pretty quickly, perhaps spend a few more minutes trying to work it out before posting a question? :P
Dave Hunt
funny thing is I search all over to try to find the answer, can't find it, then post to stackoverflow. Once I figure it out, I will post my solution, but there may be a better one. Plus...if it's already hard to find the answer, better to post on stackoverflow to help others find the information easier/faster since they have good SEO. Just sayin' =]
Andrew
if you install selenium IDE and then have a look at the commands that are there with what they do. You can then convert it to PHP in the idea to see what the equivalent is.
AutomatedTester