-1

i have some issues on my robot framework. Just trying to execute my code on gitlab but its failing. Can you please check my issue?

*** Variables ***
${URL}      https://opensource-demo.orangehrmlive.com/web/index.php/auth/login
${Browser}   headlesschrome
@{Credentials}  Admin   admin123
&{LoginData}    username=Admin  password=admin123
*** Test Cases ***
Testing_login
    sleep    3
    open browser    ${URL}     ${Browser}
    set browser implicit wait    3
    LoginKeyword
    log    das pw ist @{Credentials}    console=true
    click button  xpath=//*[@id="app"]/div[1]/div/div[1]/div/div[2]/div[2]/form/div[3]/button
    click element   class=oxd-userdropdown-name
    click element   link=Logout

    sleep    3
    close browser
MySecondTest
    [Tags]    smoke
    Log     I am inside the first test
*** Keywords ***
LoginKeyword
    input text    name=username    @{Credentials}
    sleep    3
    input password    name=password    admin123

Logs-Screen

Trying to open the headless-chrome-browser (or firefox) to login but its failing.

  • share full logs by expanding keyword section which is failed. you can go though https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser to check what is going wrong here. – Abhishek Jul 25 '23 at 17:20
  • @Abhishek i attached now the full logs. Any idea how to solve? – Yaman Kaya Jul 25 '23 at 18:08
  • It seems webdriver is not installed(not sure though) . Please go through the link given above. – Abhishek Jul 25 '23 at 20:54
  • Issue is within SeleniumLibrary and python selenium bindings. ChromeOptions does not support "headless" property anymore - https://www.selenium.dev/blog/2023/headless-is-going-away/ – rasjani Jul 26 '23 at 09:38

1 Answers1

0

Downgrade "selenium" package to the same version that you have on your local machine.

Issue is that SeleniumLibrary is using old mechanism to make Chrome "headless" and code within SL should be fixed to support the new way of doing that - which is described here; https://www.selenium.dev/blog/2023/headless-is-going-away/

rasjani
  • 7,372
  • 4
  • 22
  • 35