How do I relocate/disable GeckoDriver's log file in selenium, python 3?

前端 未结 6 1796
执笔经年
执笔经年 2021-01-02 06:14

Ahoy, how do I disable GeckoDriver\'s log file in selenium, python 3?

If that\'s not possible, how do I relocate it to Temp files?

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 06:52

    No @hidehara, but I found a way how to do it. I looked up the file init in the Selenium2Library directory. in my case: C:\Users\Eigenaardig\AppData\Local\Programs\Python\Lib\site-packages\SeleniumLibrary

    there I added these 2 lines...

    from selenium import webdriver
    driver = webdriver.Firefox(executable_path=r'C:\Users\Eigenaar\eclipse-workspace\test\test\geckodriver.exe', log_path='./Log/geckodriver.log')
    

    created the directory LOG (in Windows Explorer)

    helaas, that started 2 instances.

提交回复
热议问题