B
B
bobs322020-06-26 01:38:37
Software testing
bobs32, 2020-06-26 01:38:37

How to specify path for chromedriver in Robot Framework?

When executing the code, an error occurs:

Message: 'chromedriver' executable needs to be in PATH.

how can it be avoided?
tips from the directory do not help
HepsiburadaTest.robot file:
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  [email protected]    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 file:
*** 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


source directory: https://github.com/ozgurkayaist/RobotFramework-Pyt...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question