Задать вопрос
@bobs32

Как указать путь для chromedriver в Robot Framework?

При выполнении кода возникает ошибка:
Message: 'chromedriver' executable needs to be in PATH.

как ее можно избежать?
советы из директории не помогают
Файл HepsiburadaTest.robot:
Documentation     A test suite with a single Gherkin style test.
...
...               Hello world
...               Hello world
Resource    ../helpers/resource.robot

#Test Teardown     Close Browser
Variables   ../helpers/config.py

Library     PageObjectLibrary
Library     SeleniumLibrary
Library     Process
Library     ../pages/BasketPage.py
Library     ../pages/CheckoutPage.py
Library     ../pages/HomePage.py
Library     ../pages/LoginPage.py
Library     ../pages/ProductPage.py
Library     ../pages/SearchPage.py

Suite Setup       Browser is opened to welcome page
Suite Teardown    Stop webapp and close all browsers

*** Keywords ***
Stop webapp and close all browsers
    Terminate all processes
    Close all browsers

Browser is opened to login page
    Open browser to login page

Browser is opened to welcome page
    Open browser to welcome page

*** Test Cases ***
Logged in member adds a homepage product to basket and goes to credit card checkout page
     [Setup]  Go to page  LoginPage
     Given user logs in with credentials  ozgur.kaya@arutesolutions.com    1QAZ2wsx
     When adds a homepage product to basket
     And navigate to credit card checkout page
     Then The current page should be    CheckoutPage

Search and filter results and mark product comment as helpful
     [Setup]  Go to page  HomePage
     Given User searches for    bluetooth kulaklık
     When filter search results with brand  JBL
     And filter search results with price between   750     1000
     And filter search results with color   siyah
     And choose a product from filtered results and open comments TAB
     And mark a comment as helpful


файл resource.robot:
*** Settings ***
Documentation     A resource file with reusable keywords and variables.
...
...               The system specific keywords created here form our own
...               domain specific language. They utilize keywords provided
...               by the imported SeleniumLibrary.

Library     SeleniumLibrary


*** Variables ***
${SERVER}         www.hepsiburada.com
${BROWSER}        Chrome
${DELAY}          0.5
${VALID USER}     demo
${VALID PASSWORD}    mode
${LOGIN URL}      https://${SERVER}/uyelik/giris?ReturnUrl=%2f
${WELCOME URL}    https://${SERVER}/
${ERROR URL}      https://${SERVER}/error.html

*** Keywords ***
Open Browser To Login Page
    Open Browser    ${LOGIN URL}    ${BROWSER}
    Maximize Browser Window
    Set Selenium Speed    ${DELAY}
    Login Page Should Be Open

Open Browser To Welcome Page
    Open Browser    ${WELCOME URL}    ${BROWSER}
    Maximize Browser Window
    Set Selenium Speed    ${DELAY}
    #Login Page Should Be Open

Close Browser
    Terminate all processes
    Close all browsers

Login Page Should Be Open
    Title Should Be    Üye Giriş Sayfası – Hepsiburada.com

Go To Login Page
    Go To    ${LOGIN URL}
    Login Page Should Be Open

Welcome Page Should Be Open
    Location Should Be    ${WELCOME URL}
    Title Should Be    Welcome Page


исходная директория: https://github.com/ozgurkayaist/RobotFramework-Pyt...
  • Вопрос задан
  • 85 просмотров
Подписаться 1 Простой 2 комментария
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы