Giter VIP home page Giter VIP logo

php-selenium-client's People

Contributors

0x46616c6b avatar andrewmackrodt avatar dextercowley avatar nenadalm avatar yair27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-selenium-client's Issues

Question - Setting browser profile settings programmatically?

I can't find anything on the documentation. is there any way to do it with the actual version of SeleniumClient?

if not, is it in the roadmap to implement some sort of BrowserProfile object that you can inject into DesirableCapabilities/WebDriver class?

thanks.

Update namespace

Hi. I'm using the v2.0 of this library and I'm sucking with the error class SeleniumClient\WebDriver not found because the namespace actually is Nearsoft\SeleniumClient\WebDriver (see pict).
Please update the doc!
Thanks.
wrong namespace

Is this project dead?

Hi.
Did Nearsoft abandoned the maintainance and development of this project?
I see no activity for such a long time...

Create PSR-0 compatible package

For a more comfortable usage and integration, I would like to use this package in a PSR-0 compatible way, for example with dependency management like Composer.

(remote) file upload and firefox profile support?

Was wondering if this PHP binding offers/facilitates file uploads over RemoteWebDriver/Grid (a remote node), as well as FirefoxProfiles. If not, would be nice to add in those features.

Should be possible following references from:

Firefox profile section in this wiki link
https://github.com/facebook/php-webdriver/wiki/Launching-Browsers

Discussion on (remote) file uploads over JSONWireProtocol
https://groups.google.com/forum/?fromgroups=#!topic/selenium-developers/kDSygyDfqD0

beautifying namespacing?

can we do anything about this?
$driver->waitForElementUntilIsPresent(SeleniumClient\By::id('foo');

:)

webElementSendKeys doesn't handle multi-byte strings correctly

When a multi-byte string is passed to webElementSendKeys, it gets split into individual bytes instead of multi-byte characters. For example, when I tried to type my name in Hebrew which is "רון", WebDriver tried to send it as six invalid characters.

WebDriver not working, 2 required files not included

This is the list of requires I have at the top of WebDriver.php and now its working

require_once DIR . '/By.php';
require_once DIR . '/DesiredCapabilities.php';
require_once DIR . '/Http/Exceptions.php';
require_once DIR . '/Http/HttpFactory.php';
require_once DIR . '/Http/HttpClient.php';
require_once DIR . '/TargetLocator.php';
require_once DIR . '/WebElement.php';

require_once DIR . '/Commands/Command.php'; #added
require_once DIR . '/Commands/Commands.php'; #moved
require_once DIR . '/WebDriverWait.php'; #added

webElementClick() sends "Content-Length: -1" in the request header

The sniffer says:

  • Http: Request, POST /wd/hub/session/1351527024973/element/3/click
    Command: POST

    • URI: /wd/hub/session/1351527024973/element/3/click
      Location: /wd/hub/session/1351527024973/element/3/click
      ProtocolVersion: HTTP/1.1
    • ContentType: application/json;charset=UTF-8
    • MediaType: application/json;charset=UTF-8
      MainType: application/json
      charset: UTF-8

    Accept: application/json
    ContentLength: -1
    Expect: 100-continue
    HeaderEnd: CRLF

Question about list of methods in comment block at top of WebDriver.php

Hi,

Just wondering about this,
You have a big list of methods here, in a big comment block, but the comment doesn't give an indication where these methods are implemented or how they can be used?
For example the string "findElementByCssSelector" doesn't exist in any other php files in the SeleniumClient dir besides in this comment block of WebDriver.php.
And they're all shown with the namespace SeleniumClient\WebElement, yet they work directly on the webdriver object, for example:
require "/path/to/SeleniumClient/WebDriver.php";
$driver = new SeleniumClient\WebDriver();
$el = $driver->findElementsByCssSelector($sel); #works
?

/**

  • @param string $selectorValue
  • @param string $selectorDefinition
  • @param bool $polling
  • @method \SeleniumClient\WebElement findElementByCssSelector($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement findElementById($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement findElementByJsSelector($selectorValue, $selectorDefinition='$', $polling=false)
  • @method \SeleniumClient\WebElement findElementByLinkText($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement findElementByName($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement findElementByPartialLinkText($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement findElementByTagName($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement findElementByXPath($selectorValue, $polling=false)
    *
  • @method \SeleniumClient\WebElement[] findElementsByCssSelector($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsById($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsByJsSelector($selectorValue, $selectorDefinition='$', $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsByLinkText($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsByName($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsByPartialLinkText($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsByTagName($selectorValue, $polling=false)
  • @method \SeleniumClient\WebElement[] findElementsByXPath($selectorValue, $polling=false)
    */

Enabling wiki

Is it possible to enable the wiki for this project, even it's purely for examples supplied by the community...perhaps linking out to snippets at https://gist.github.com
I have a basic test using click that isn't working and this is a barrier to me using these bindings at the moment, once I resolve the issue I would like to be able to share my solution/learnings for others.

waitForElementUntilIsPresent doesn't work with By::linkText

By::linkText seems to me doesn't work with waitForElementUntilIsPresent

Here is small example:

        $this->_driver->get("https://www.google.com/");
        $this->_driver->findElement(By::id("gbqfq"))->setValue("phpunit");
        $manualLink =  $this->_driver->waitForElementUntilIsPresent(By::linkText("PHPUnit Manual"));
        $manualLink->click();

I get SeleniumClient\Http\SeleniumUnknownErrorException : An unknown server-side error occurred while processing the command.
And on SeleniumServer

15:31:40.100 INFO - Executing: [click: null] at URL: /session/1d45438b-a2f5-4d73-bb64-a4070cf6a1b7/element//c
lick)
15:31:40.101 WARN - Exception thrown
java.lang.NullPointerException
at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:29)
at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

When I debug the code and give page time to load then it works. I see problem at WebDriver.php line 65 where $resultObject is returned (SeleniumClient\WebElement) but _elementId is NULL. When link is found _elementId is 1.

Is it bug or I should do it differently?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.