Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - Why can't Selenium RC see a site on virtual machine -


i'm having trouble getting selenium see sites hosted on virtual machine. following test causes error, , have no idea why:

<?php  require_once 'phpunit/extensions/seleniumtestcase.php';  class actualtest extends phpunit_extensions_seleniumtestcase {     protected function setup()     {         $this->setbrowser("*firefox");         $this->setbrowserurl("http://10.48.77.48/"); // ip of virtual machine         $this->sethost('192.168.101.1'); // ip of mac     }      public function testgethomepage()     {         $this->open("/", true);     } } 

it returns following error message, indicating couldn't find virtual machine:

$ phpunit actualtest.php phpunit 3.5.6 sebastian bergmann.  e  time: 7 seconds, memory: 6.75mb  there 1 error:  1) actualtest::testgethomepage phpunit_framework_exception: response selenium rc server testcomplete(). xhr error: url = http://10.48.77.48/ response_code = 404 error_message = page not found.   /home/craiga/ombudsman/app/systemtests/actualtest.php:16  failures! tests: 1, assertions: 0, errors: 1. 

i can access site browser anywhere on network without problem, reason browser launched selenium can't. error occurs whether launch test virtual machine or mac.

i can following test connect google without problem:

<?php  require_once 'phpunit/extensions/seleniumtestcase.php';  class vanitysearchtest extends phpunit_extensions_seleniumtestcase {     protected function setup()     {         $this->setbrowser("*firefox");         $this->setbrowserurl("http://www.google.com.au/");         $this->sethost('192.168.101.1'); // ip of mac     }      public function testsearchforself()     {         $this->open("/");         $this->type("q", "craig anderson");         $this->click("btng");         $this->waitforpagetoload("30000");         try {                 $this->asserttrue($this->istextpresent("craiga.id.au"));         } catch (phpunit_framework_assertionfailederror $e) {                 array_push($this->verificationerrors, $e->tostring());         }     } } 

this test, connects mac's default page, passes without problems:

<?php  require_once 'phpunit/extensions/seleniumtestcase.php';  class mactest extends phpunit_extensions_seleniumtestcase {     protected function setup()     {         $this->setbrowser("*firefox");         $this->setbrowserurl("http://192.168.101.1/");         $this->sethost('192.168.101.1'); // ip of mac     }      public function testmachomepage()     {         $this->open("/");         try {                 $this->asserttrue($this->istextpresent("it works!"));         } catch (phpunit_framework_assertionfailederror $e) {                 array_push($this->verificationerrors, $e->tostring());         }     } } 

does have idea why might happening? i'm happy provide whatever information can setup. i'm using selenium server 1.0.3, , latest phpunit pear.

remove 1 http below line

$this->setbrowserurl("http://http://10.48.77.48/"); // ip of virtual machine 

and try...let me know if works


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -