Selenium RC and PHP for beginners

I am running an ubuntu server with apache / php / mysql. I want to use selenium in one of my php projects. Basically, I need a setting where I can more or less copy the paste code from the Selenium IDE (format configured on php) into my php project, for example:

<?php

require_once 'PHPUnit/Extensions/SeleniumTestCase.php';

class Example extends PHPUnit_Extensions_SeleniumTestCase
{
  protected function setUp()
  {
    $this->setBrowser("*chrome");
    $this->setBrowserUrl("http://www.google.com/");
  }

  public function testMyTestCase()
  {
    $this->type("q", "stack overflow");
    $this->click("link=2");
    $this->waitForPageToLoad("30000");
    $this->click("btnG");
    $this->waitForPageToLoad("30000");
    $this->type("q", "Qaru php");
    $this->click("btnG");
    $this->waitForPageToLoad("30000");
  }
}
?>

I tried to figure out how to do this in PHP using Selenium RC, but the documentation is confusing and outdated.

I would be very grateful for the beginner's instructions on how to get started with PHP and Selenium RC.

Many thanks.

EDIT:

Thanks for the feedback. I have Selenium and runs on Ubuntu / firefox, and obviously this is not what I'm looking for. The fact that it runs a java server and is dependent on a full-blown browser makes it something easy.

- , php dom/html, , .

+3
7

Selenium, , Selenium IDE, , - .

Selenium , Selenium RC.

+1

Selenium RC ( ), , ​​JRE

java -jar selenium-server.jar

Selenium RC localhost ( 4444), , , PHP- (Pear).

, Testing_Selenium (Pear) , . HTTP POST, (http://github.com/tszming/Testing_Selenium--Patch-)

+3

SauceLabs onDemand Selenium PHP. Selenium RC. 30- , .

http://saucelabs.com/ondemand

0

phpQuery , jQuery.

0

Selenium RC . -webdriver - , , , , , . Nearsoft - JSON Wire, selenium, Java PHP. , , : https://github.com/Nearsoft/PHP-SeleniumClient

, , , , :)

, .

0

Selenium IDE, Selenium RC. selenium-server-standalone, phpunit . Google .

phpunit , Selenium IDE, Selenium IDE PHP Formaters, Selenium IDE->file->export php (phpunit).

, cmd, :

phpunit c:\path\to\myfile.php

, .

0

Source: https://habr.com/ru/post/1768394/


All Articles