# Тестирование

## Зависимости

* git clone <https://github.com/brain-tec/odoo-robot-framework>
* ```
  pip install robotframework
  ```
* ```
  pip install robotframework-seleniumlibrary
  ```
* ```
  pip install -U erppeek
  ```

{% embed url="<http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html>" %}

### Установить модуль для  Odoo

* [https://github.com/brain-tec/web\_selenium/](https://github.com/brain-tec/web_selenium/tree/10.0)

### Пример теста

Файл project.robot

```
*** Settings ***
Resource    odoo_10_0.robot


*** Test Cases ***
Valid Login
    Login  user=admin  password=admin
    sleep  1s
Nibbana Project
    MainMenuXMLid  nibbana.nibbana_top_menu
    SubSubMenuXMLid  nibbana.projects_menu
    Button  model=nibbana.project  button_name=oe_list_add
    Many2OneSelect  nibbana.project  area  Work
    Char  nibbana.project  name  Test
    Button  model=nibbana.project  button_name=oe_form_button_save
Create Task
    SubSubMenuXMLid  nibbana.tasks_menu
    Button  model=nibbana.task  button_name=oe_list_add
    Many2oneSelect  nibbana.task  project  Mail server
    Char  nibbana.task  name  Test task_1
    Button  model=nibbana.task  button_name=oe_form_button_save
Task List Project Button
    SubSubMenuXMLid  nibbana.tasks_menu

close
    close browser

```

**Запуск**

```
robot -v CONFIG:config.py project.robot
```

### Примечания

* Конфигурационные параметры в config.py
* Согласно синтаксису Robot Framework ключевые слова разделяются двумя или более пробелами


---

# 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://comlib.gitbook.io/odoo/testirovanie.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.
