How to run headless REMOTE chrome using robot framework

后端 未结 6 973
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 09:52

I\'m trying to run chrome headless with my robot framework tests suites. I managed to do it independtly with python using selenium as follows:

options = webd         


        
6条回答
  •  無奈伤痛
    2020-12-14 10:56

    Please try the below. Run the keyword in Test setup

    Running the tests in chrome headless
        ${chrome options} =     Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
        Call Method    ${chrome options}   add_argument    headless
        Call Method    ${chrome options}   add_argument    disable-gpu
        Create Webdriver    Chrome    chrome_options=${chrome options}
    

提交回复
热议问题