lundi 17 août 2020

Executable path keyword is not working for me

I am integrating my Robot framework scripts with Jenkins. Previously i used Python version path for drivers, It was working fine.but now we need to keep the drivers in project location and we need to give that path into the executable path keyword. i tried with absolute path and relative path, but it is not working.Please find the below script for your reference. I kept my drivers in same folder wherever this file available. So , by default this ${CURDIR} is returning current file directory.

Below path i am getting inside of executable path

    *** Settings ***
Library      SeleniumLibrary
Variables    ../Resources/PageObjects/Login_Dashboard_TestData.py
Variables    ../Resources/PageObjects/Login_Dashboard_locators.py

*** Keywords ***
Start Browser
    [Arguments]                ${url}
    Set Global Variable  ${testsRootFolder}  ${CURDIR}
    log        ${testsRootFolder}
    ${chrome_path}      Catenate   SEPARATOR=       ${CURDIR}          \\     chromedriver.exe
    log     ${chrome_path}
    create webdriver           ${Browser}       executable_path='${chrome_path}'
    ${driver}=                 Open Browser    ${url}       ${Browser}
    Set Global Variable        ${driver}
    Maximize Browser Window

I am getting below error.

Setup failed: TypeError: 'module' object is not callable

Aucun commentaire:

Enregistrer un commentaire