# Unable to run for different browsers using --Variable of Robot Framework

**URL:** <https://forum.robotframework.org/t/unable-to-run-for-different-browsers-using-variable-of-robot-framework/419>\
**Category:** Robot Framework\
**Created:** [2 July 2020 02:59 UTC](https://forum.robotframework.org/t/unable-to-run-for-different-browsers-using-variable-of-robot-framework/419 "2020-07-02T02:59:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpagadala](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@rpagadala](https://forum.robotframework.org/u/rpagadala)\
**Post date:** [2 July 2020 02:59 UTC](https://forum.robotframework.org/t/unable-to-run-for-different-browsers-using-variable-of-robot-framework/419/1 "2020-07-02T02:59:33Z")

</div>

Hi,

In the commonResource.robot i have specified the Browser as variable and assigned to chrome, but when i tried to run from the terminal using the below command

C:\Users\rajre\PycharmProjects\Automation\>robot --variable Browser:firefox TestCases\LoginTest.robot

rows error as \*\*"SessionNotCreatedException: Message: Unable to find a matching set of capabilities "

**Note:** I have kept the geckodriver.exe at location C:\Users\rajre\PycharmProjects\Automation\venv\Scripts

**LoginKeywords.robot:**  
\*\*\* Settings \*\*\*  
Library Selenium2Library  
Variables …/PageObjects/Locaters.py

\*\*\* Keywords \*\*\*  
Open my Browser  
[Arguments] {AppUrl} {Browser}  
open browser {AppUrl} {Browser}  
maximize browser window

Input UserName  
[Arguments] {Username} input text {txt\_loginUserName} ${Username}

Input Pwd  
[Arguments] {Password} input text {txt\_loginPassword} ${Password}

Click Login Button  
click button ${btn\_Login}

Verify Message  
should contain Password cannot be empty Password cannot be empty  
should contain Username cannot be empty Username cannot be empty  
should contain Invalid credentials Invalid credentials  
should contain Dashboard Dashboard

**LoginTest.robot**  
\*\*\* Settings \*\*\*  
Library Selenium2Library  
Resource …/Resources/LoginKeywords.robot  
Resource …/Resources/commonResource.robot  
Library DataDriver …/TestData/LoginTestData.xlsx

Suite Setup Open my Browser {AppUrl} {Browser}  
Suite Teardown Close Browser  
Test Template Login Validation  
\*\*\* Test Cases \*\*\*

LoginTest  
Login Validation

\*\*\* Keywords \*\*\*  
Login Validation  
[Arguments] {Username} {Password}  
Input UserName {Username} sleep 1 Input Pwd {Password}  
sleep 1  
Click Login Button  
sleep 1  
Verify Message

LoginTest.robotI have tried this way too, but no luck  
Suite Setup Open my Browser {AppUrl} browser={Browser}  
C:\Users\rajre\PycharmProjects\Automation\>robot --variable browser:firefox TestCases\LoginTest.robot

Thanks,  
Rajani

---

<div class="post-metadata">

**Author:** ![Nuit](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/nuit/32/125_2.png) [@Nuit](https://forum.robotframework.org/u/Nuit)\
**Post date:** [2 July 2020 15:16 UTC](https://forum.robotframework.org/t/unable-to-run-for-different-browsers-using-variable-of-robot-framework/419/2 "2020-07-02T15:16:54Z")

</div>

> [@rpagadala](#):
>
> Suite Setup Open my Browser {AppUrl} {Browser}

Hi, I think it’s because the variables are missing the `$` prefix. Ex:  
`Suite Setup Open my Browser ${AppUrl} ${Browser}`

Edit: or maybe it’s just that the forum ate the `$` 😃
