Commit 9cec1f94 authored by Nandy Limachi's avatar Nandy Limachi

Script de ingreso a Riot, creando salas y añadiendo conversaciones

parent f75ec5cf

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# Instalación
## Dependencias
Instalar las siguientes dependencias
```
sudo apt-get install nodejs
npm install --global mocha
npm install --global selenium-webdriver
```
## Compilación
Clonar el proyecto
```
git@gitlab.geo.gob.bo:nlimachi/selenium-riot.git
```
###Configuración
Modifique el archivo room sin dejar espacios vacíos
```
USERNAME: nombre-de-usuario
PASSWORD: contraseña
NOMBRE-DE-LA-SALA: NOMBRE-SALA-O-GRUPO
INTEGRANTES
@acontacto:agetic.gob.bo
@bcontacto:agetic.gob.bo
```
Modifique el archivo chats sin dejar espacios vacíos
```
NUEVAS CONVERSACIONES
@acontacto:agetic.gob.bo
@bcontacto:agetic.gob.bo
@ccontacto:agetic.gob.bo
```
###Ejecución del test
Ingresar a la carpeta selenium-riot y ejecutar la siguiente linea
```
mocha testRiot.js
```
"Script para Riot con Selenium Node.js Mocha"
\ No newline at end of file
# Selenium Riot - Genera de Sala y Chats
Accede directamente a un navegador para cargar la pagina de Riot.
Posteriormente ingresa el usuario y contraseña para iniciar sesión.
Iniciada la sesión se crea una nueva sala si esta no existe; posteriormente añade los contactos.
Por ultimo crea conversaciones de contactos, si estos no existen.
## Instalación
[Archivo de instalación](INSTALL.md)
## Tecnologías utilizadas:
* [Selenium](http://www.seleniumhq.org/)
* [Node.js](https://nodejs.org/es/)
* [Mocha](https://mochajs.org/)
NUEVOS CONTACTOS
@ausuario:agetic.gob.bo
@busuario:agetic.gob.bo
@cusuario:agetic.gob.bo
\ No newline at end of file
File added
../mocha/bin/_mocha
\ No newline at end of file
../mkdirp/bin/cmd.js
\ No newline at end of file
../mocha/bin/mocha
\ No newline at end of file
../rimraf/bin.js
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Copyright 2011-2017 Software Freedom Conservancy
Copyright 2004-2011 Selenium committers
# selenium-webdriver
Selenium is a browser automation library. Most often used for testing
web-applications, Selenium may be used for any task that requires automating
interaction with the browser.
## Installation
Selenium may be installed via npm with
npm install selenium-webdriver
You will need to download additional components to work with each of the major
browsers. The drivers for Chrome, Firefox, PhantomJS, Opera, and
Microsoft's IE and Edge web browsers are all standalone executables that should
be placed on your system [PATH]. Apple's safaridriver is shipped with
Safari 10 for OS X El Capitan and macOS Sierra. You will need to enable Remote
Automation in the Develop menu of Safari 10 before testing.
| Browser | Component |
| ----------------- | ---------------------------------- |
| Chrome | [chromedriver(.exe)][chrome] |
| Internet Explorer | [IEDriverServer.exe][release] |
| Edge | [MicrosoftWebDriver.msi][edge] |
| Firefox | [geckodriver(.exe)][geckodriver] |
| PhantomJS | [phantomjs(.exe)][phantomjs] |
| Opera | [operadriver(.exe)][opera] |
| Safari | [safaridriver] |
## Usage
The sample below and others are included in the `example` directory. You may
also find the tests for selenium-webdriver informative.
var webdriver = require('selenium-webdriver'),
By = webdriver.By,
until = webdriver.until;
var driver = new webdriver.Builder()
.forBrowser('firefox')
.build();
driver.get('http://www.google.com/ncr');
driver.findElement(By.name('q')).sendKeys('webdriver');
driver.findElement(By.name('btnG')).click();
driver.wait(until.titleIs('webdriver - Google Search'), 1000);
driver.quit();
### Using the Builder API
The `Builder` class is your one-stop shop for configuring new WebDriver
instances. Rather than clutter your code with branches for the various browsers,
the builder lets you set all options in one flow. When you call
`Builder#build()`, all options irrelevant to the selected browser are dropped:
var webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
firefox = require('selenium-webdriver/firefox');
var driver = new webdriver.Builder()
.forBrowser('firefox')
.setChromeOptions(/* ... */)
.setFirefoxOptions(/* ... */)
.build();
Why would you want to configure options irrelevant to the target browser? The
`Builder`'s API defines your _default_ configuration. You can change the target
browser at runtime through the `SELENIUM_BROWSER` environment variable. For
example, the `example/google_search.js` script is configured to run against
Firefox. You can run the example against other browsers just by changing the
runtime environment
# cd node_modules/selenium-webdriver
node example/google_search
SELENIUM_BROWSER=chrome node example/google_search
SELENIUM_BROWSER=safari node example/google_search
### The Standalone Selenium Server
The standalone Selenium Server acts as a proxy between your script and the
browser-specific drivers. The server may be used when running locally, but it's
not recommend as it introduces an extra hop for each request and will slow
things down. The server is required, however, to use a browser on a remote host
(most browser drivers, like the IEDriverServer, do not accept remote
connections).
To use the Selenium Server, you will need to install the
[JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and
download the latest server from [Selenium][release]. Once downloaded, run the
server with
java -jar selenium-server-standalone-2.45.0.jar
You may configure your tests to run against a remote server through the Builder
API:
var driver = new webdriver.Builder()
.forBrowser('firefox')
.usingServer('http://localhost:4444/wd/hub')
.build();
Or change the Builder's configuration at runtime with the `SELENIUM_REMOTE_URL`
environment variable:
SELENIUM_REMOTE_URL="http://localhost:4444/wd/hub" node script.js
You can experiment with these options using the `example/google_search.js`
script provided with `selenium-webdriver`.