Frequently asked questions about robotframework+selenium2library operation
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.