【发布时间】:2014-09-18 14:29:36
【问题描述】:
我正在阅读一个教程,在 PHPUNIT 上我得到了很好的教程退出......并进行了一些登录 我自己..
但我进入网络加载页面并在实时页面上提交值
它工作正常......但我遇到的问题是在输入用户密钥后..它提交但它不会等待下一页
我在这里看到类似的问题,但没有一个适合我
谁能帮帮我。
这是我的代码
<?php
class TestLogin extends PHPUnit_Extensions_Selenium2TestCase {
public function setUp()
{
$this->setHost('localhost');
$this->setPort(4444);
$this->setBrowser('firefox');
$this->setBrowserUrl('http://localhost/tutor');
}
public function setSpeed($timeInMilliSec)
{
$this->setSpeed('120');
}
/*Function to locate website*/
public function testHasLoginForm()
{
$this->url('http://www.jamb.org.ng/DirectEntry/');/*This is the site*/
$username = $this->byId('ctl00_ContentPlaceHolder1_RegNumber');/*Search for a name*/
##ctl00_ContentPlaceHolder1_txtRegNumber
$action = $this->byId('ctl00_ContentPlaceHolder1_Reprint')->attribute('action');
$this->byId('ctl00_ContentPlaceHolder1_RegNumber')->value('49130518ED');/*value of the textbox*/
$jump = $this->byId('ctl00_ContentPlaceHolder1_Reprint');
$jump->submit();
}
}
?>
【问题讨论】:
-
setSpeed是没用的方法。
标签: php selenium phpunit pear wampserver