I am new to Robot Framework. I have Windows 10 OS and Pycharm installed on the same. I have recently installed the plugin for Robot Framework in Pycharm. Trying to test basic stuff but getting this error:
WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH. Here’s the part of code snap:
Documentation This is a test suite with Robot Framework for message board
Library Selenium2Library
First off, do not use Selenium2Library, it is just SeleniumLibrary. Selenium2Library is really just a “proxy” for backwards compatibility for people who where using it when it was a thing. New code does not need to use it.
Your example vs the error message - you are passing “chrome” as browser but the error message indicates that Open Browser keyword is trying to open Firefox (eg, error message about missing geckodriver, which is webdriver for Firefox). Most likely, you dont have enough spaces between the url and the browser name … Which is hard to determine also because formatting of the code block isn’t correct.
*** Variables *** {SERVER} http://127.0.0.1:5000/create
{BROWSER} firefox {TITLE} create message
{MESSAGE} How are you? {SENDER} Niladri
{URL} www.google.com
${NOTIFICATION} Message has been sent!
*** Test Cases ***
create message
Open Browser to Index Page
Input Title
Input Message
Input Sender
Input Url
Click Submit
Message is created
[Teardown] Close Browser
*** Keywords ***
Open Browser to Index Page
Open Browser ${SERVER}
Input Title
[Arguments] {TITLE}
Input Text title {TITLE}
Input Message
[Arguments] {MESSAGE}
Input Text message {MESSAGE}
Input Sender
[Arguments] {SENDER}
Input Text sender {SENDER}