# Selenium

## Prerequisites

PHP Apache server is required to run Selenium Rest Service.

## System Configuration

Before you continue to the integration, you must first configure Selenium onto <code class="expression">space.vars.SITENAME</code>. Click [System Configuration](https://docs.opshub.com/v7.220/integrate/configure-integrations/system-configuration) to learn the step-by-step process to configure a system.

Refer to the screenshot given below for reference.

<div align="center"><img src="https://3947802292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOGKjoRFyp6twVYuUpGPO%2Fuploads%2Fgit-blob-a59c03fb25a11ef71acdae80bc850f675e9696f1%2FSelenium_Image_1a.png?alt=media" alt="" width="900"></div>

If the system is deployed on HTTPS and a self-signed certificate is used, then you will have to import the SSL Certificate to be able to access the system from <code class="expression">space.vars.SITENAME</code>. Click [Import SSL Certificates](https://docs.opshub.com/v7.220/getting-started/installation/ssl-certificate-configuration) to learn how to import SSL certificate.

## Mapping Configuration

Map the fields between Selenium and the other system to be integrated to ensure that the data between both the systems synchronizes correctly.\
Click [Mapping Configuration](https://docs.opshub.com/v7.220/integrate/configure-integrations/mapping-configuration) to learn the step-by-step process to configure mapping between the systems.

## Integration Configuration

Set a time to synchronize data between Selenium and the other system to be integrated. Also, define parameters and conditions, if any, for integration.\
Click [Integration Configuration](https://docs.opshub.com/v7.220/integrate/configure-integrations/integration-configuration) to learn the step-by-step process to configure integration between two systems.

## Appendix

### Selenium Rest Service Installation

* Extract zip file from `<OpsHub Installtion Directory>/Other_Resources/Resources/OpsHubSeleniumRest.zip` to PHP Public directory.\
  **For Example:** `E:/wamp/www/OpsHubSeleniumRest.zip`
* Open `config.php` file located at `OpsHubSeleniumRest/application/config/` directory and specify directory which you want to poll.

```php
/** 
 * Here User can define list of Selenium test directory 
 */
$config[SELENIUM_DIRS] = [
    "E:\\SeleniumTestScripts\\",
    "E:\\FormLoader\\test\\"
];
```

* Require enabling Apache service `rewrite_module`.
* Open `http://<hostname>/OpsHubSeleniumRest/rest/` URL to check service is properly deployed.

### Known Limitations

Only polling is supported for this connector.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opshub.com/v7.220/connectors/selenium.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
