doujiao4710 2014-07-29 21:21
浏览 36

too long

I'm learning PHPUNIT at the moment. It was getting interesting until i got stuck on something.

I "logged-in" it and went well,

But this PrintOut just displays. Is there anyway I could remove it?

Actually I just want to get the value of the Surname, FirstName and the the picture most importantly, the picture.

The picture is saved as /ImagePage.aspx. Is there a way in which I can download this and force close the browser because I don't know how to close the print Pop-out

The picture frame id is CandImg

This is my code:

<?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*/
        $this->assertContains('Reg.Number/PIN', $username->value());
        ##ctl00_ContentPlaceHolder1_txtRegNumber
        $action = $this->byName('ctl00$ContentPlaceHolder1$Reprint')->attribute('action');
        $this->byId('ctl00_ContentPlaceHolder1_RegNumber')->value('49003257DE');/*value of the textbox*/
        $jump = $this->byName('ctl00$ContentPlaceHolder1$Reprint');
        $this->byName('ctl00$ContentPlaceHolder1$Reprint')->click();
    }           

}    
#to Save ImagePage.aspx
?>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大