Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Frequently asked questions about robotframework+selenium2library operation

Shulou Source: shulou.com Published: 2022-06-03 01:38:32 10月03日 Update

Question 1:

Command: pybot.bat-- argumentfile c:\ users\ lenovo\ appdata\ local\ temp\ RIDEeoqulh.d\ argfile.txt-- listener D:\ Python27\ lib\ site-packages\ robotide\ contrib\ testrunner\ TestRunnerAgent.py:16115:False C:\ Users\ lenovo\ Desktop\ test\ test

Solution: add C:\ python27\ scripts to the environment variable path

Question 2:

WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.

Solution: set IE browser Internet options-> Select Security-> remove or select all enabled modes under Internet, local Intranet, trusted sites, and restricted sites.

Question 3:

WebDriverException: Message: 'IEDriver executable needs to be available in the path.

Solution: download IEDriver or chromeDriver and put them in D:\ Python27\ Scripts, provided your python is installed on this D disk.

Question 4:

[WARN] Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError:' NoneType' object has no attribute 'encode'

Solution: find the utils directory of Selenium2Library, modify the browsercache.py file in it, and change the statement "browser.quit ()" in the def close (self): method to "browser.close ()". This problem can be solved.

Tags: Problems solutions sites security premises variables trustworthiness files methods patterns browsers environments directories statements browsing unification selection common frequently asked questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MariaDB Docker Shulou Technology Microsoft