PHP-Formatter-PHPUnit_Selenium2
PHP-Formatter-PHPUnit_Selenium2 copied to clipboard
statement is not a function
Somehow, when I chain few steps in a row my output gives me some exceptions. Last 3 steps are changing username and clicking on submit button.
Firefox: 23.0.1 Os: Mac OS X 10.7.5 Selenium IDE: 2.3.0 PHP Formatter: https://github.com/suzuki/PHP-Formatter-PHPUnit_Selenium2
Output:
<?php
class Sel extends PHPUnit_Extensions_Selenium2TestCase
{
/**
* Setup
*/
public function setUp()
{
$this->setBrowser('firefox');
$this->setHost('127.0.0.1');
$this->setPort(4444);
$this->setBrowserUrl('http://test/');
}
/**
* Method testSel
* @test
*/
public function testSel()
{
$this->url("/user/add");
$this->byId("submit")->click();
$result = $this->byId("username-err")->text();
$this->assertEquals("Username must consist of between 2 and 30 alphanumeric characters", $result);
$result = $this->byId("firstName-err")->text();
$this->assertEquals("First name must consist of between 2 and 30 alphanumeric characters", $result);
// ERROR: Caught exception [TypeError: statement is not a function]
// ERROR: Caught exception [TypeError: statement is not a function]
// ERROR: Caught exception [TypeError: statement is not a function]
}
}
Hey guys,
is there any activity around here? I want to participate in this project. I want to put some more selenium commands into this formatter, but failing hard ;). i always get this
// ERROR: Caught exception [TypeError: statement is not a function]
The Commands from Selenium IDE HTML are
If i get a hint i'll do all the work to integrate these and many more commands.
Xubuntu 13.10 with Firefox 26.0, Selenium 2.4.0, PHP 5.5.3, PHPUnit 3.6.10
Seeing a similar issue when attempting to format:
<tr>
<td>select</td>
<td>id=edit-field-country-of-residence-value</td>
<td>label=United States</td>
</tr>
PHP-Formatter-PHPUnit_Selenium2 outputs:
// ERROR: Caught exception [TypeError: value.replace is not a function]
If there's activity here, I'll help debug and test...
Hey,
i did some work in my forked repo. Try https://github.com/timruether/PHP-Formatter-PHPUnit_Selenium2 and test your commands there. I use it in current projects ,so i'll investigate fast in issues with errors. My goal is it to cover the whole command set from IDE and translate it into Webdriver compatible code.
Thx for your work suzuki :)
Tim
@timruether thanks to fork this !
I work hard to my job and other projects now, so I support this project in lower priorit. @vladimirbasic , @openprivacy , sorry reply is late.
@timruether - thanks for the fork and the note. I added a comment referring to my note above on the handling of 'select'...
@suzuki - thanks for creating this project!
I commited a new version in my fork with select please open issues there.
You seem to have disabled issues in your repo after I created one...