Download the PHP package akdr/selma without Composer

On this page you can find all versions of the php package akdr/selma. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package selma

Selma

A PHP-Webdriver wrapper trying to simplify the usage of web-scraping.

Usage

To use the wrapper you need to have a Selenium Hub up and running.

To set it up, google or use the docker-compose.yml in the docker directory. Instructions how to start it once you have docker installed is in the file.

Navigation

Navigation handles the browser navigation and manipulation. Its used by the Element class and needs to be started before you try to scrape.

`

Available methods:
Method Arguments Comment Return type
goTo String Make the browser go to the page in first argument. Navigation
currentUrl none Returns the current URL as a string. String
javascript String Executes javascript in the browser and returns it output. ?String
scrollTo ?Int Scrolls the page to the first arguments X-value. If omitted is scrolls to the bottom. Navigation
screenshot String Takes a screenshot of the page and saves it to the absolute path from the first argument. Navigation
getSource none Returns the source from the current URL as a string. String
cli String Prints a message in the error-log Navigation

Element

The Element class handles everything DOM-related. It searches for DOM-elements, extracts text, filling in inputs and clicking elements.

Available methods

To get an Element and manipulate it, you can either use the construct or the set() method. They both takes an array as argument and is executed in the order being presented. The selector key has to be set and always (with the exception of 'element') be first.

Key Value-type Comment
element Facebook\WebDriver\ Remote\RemoteWebElement If you need to find a multiple elements and their offspring, you can inject a RemoteWebElement and find its children through 'selector'
selector String Gets the first matching selector with the matching CSS-selector. If the key 'element' is set, it will search inside that Element.
attribute String Gets the attribute of the 'selector'. 'text' for the text, 'href' for the link and so on.
click Bool If true, the browser will try and click the 'selector' element.
class String Sets the property $hasClass to true if the 'selector' element has the CSS-class, else false.
input String Prints the argument into the 'selector' element.
pressKey String Presses the button passed in the argument, uses constants found here
delay Int Makes the browser sleep for the amount of milliseconds in the argument
waitForElement Int Waits for an element to appear in the browser. The argument sets amount of 0.01 seconds delays it is going to wait.

To get the value from attribute, chain ->getValue('int'|'float'|null) on to the construct or set().

Public properties

If you need to retrieve the RemoteWebElement, call for the property inside the class named 'element'.

If you need to retrieve the class-bool, call for the property 'hasClass'.

Example:


All versions of selma with dependencies

PHP Build Version
Package Version
Requires php-webdriver/webdriver Version >=1.13.0
jbzoo/utils Version 5.*
php Version >=8.0
jbzoo/data Version 5.*
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package akdr/selma contains the following files

Loading the files please wait ....