In this post, we will integrate RobotFramework with BrowserStack and we will run our test in BrowserStack’s cloud grid system. Last week, I described how to install and use RobotFramework in this post. If you don’t have any experience or if you don’t know how to use RobotFramework, please check that post first.

Please, see the latest update for RobotFramework and Selenium 3.0 Integration in this article. 

I want to go with the same Linkedin Login test example. Our test scenario is shown below:

  • Open LinkedIn page
  • Check Title
  • Enter User Name
  • Enter the Wrong Password
  • Click Login
  • Wait 5 seconds
  • Assert Warning Message
  • Close Browser

This time, I want to use two files for better test structure. These are setup.robot and BrowserStackLoginTest.robot

We will have two folders one of them is Resource and the other is Tests folder. Resource folder comprises of setup.robot and Tests folder contains BrowserStackLoginTest.robot file.


setup.robot file holds Settings, Variables, Keywords information and BrowserStackLoginTest.robot contains test codes.


In order to connect BrowserStack, we should register it and have an account. By using our account’s AccessKey and username information, we can connect BrowserStack. Also, we should use desired capabilities to declare which operating system, browser, browser version, OS version, etc. we will use. In below code, I did all these settings.

When I tried to run the same test on BrowserStack I got an encoding error on “Title Should Be” method. I tried to fix that encoding problem but I was not successful. I also asked this issue on StackOverflow (Link: If you know the solution, please write a comment.

Error Screen is shown below. ūüôĀ


Now, let’s write our test robot file.


Execution & Results

Open a command prompt and go to your test folder and then type below command.

Then, you will see below execution at the command prompt.


and you will see test execution on BrowserStack’s Dashboard.