Skip to content

This repo is a working sample for best practices to be followed when running a Ranorex project on Remote Webdriver using Browsertack.

License

Notifications You must be signed in to change notification settings

BrowserStackCE/Ranorex-Best-Practices

Repository files navigation

Ranorex-Best-Practices

Getting Started with Browserstack

This guide is meant to provide Ranorex specific information to help you have a smoother experience on Browserstack. For Introductory information refer to Browserstack's official documentation on Ranorex.

Index

  • Issues with KeySequences and PressKeys.
  • Clicks not working.
  • Clear text field

General-Best-Practices

  1. Start browser window in maximised mode while recording the tests and when executing the same.
  2. Start Selenium Server on your local machine.

Frequent-Issues

  1. mouse click not working
  2. execute clear text field
  3. execute presskey for String and then Enter key

Bug-1

Click is based on coordinates called ActionSpot. If resolution is not the same, coordinates would change. The window size and resolution should be the same while recording the session in the local machine and while execution of the session on browserstack.

  • Prerequisites for successful recording. We can ensure this by passing Maximized as True

  • I confirmed my local machines Screen Dimensions from the .rxlogs. (XXXX x YYY). And passed the capability: resolution" : "XXXX x YYY".

Bug-2

You may have a hard time executing key combinations, due to delays and waits not being properly applied. Certain key combinations are not supported by Ranorex on remote web driver. Found it to be a Ranorex issue.

Option 1 :

For Key Combinations, I created a User code and used Selenium commands in it. Note:

  • It is necessary to have the selenium server running to execute the Selenium commands or it may not work on your local machine.
  • Ranorex recommends using mouse click instead of tab key for navigation.

Option 2 :

Another solution which will work on ranorex locally and on browserstack is to use javascript executors.

  • For the use case of clearing out forms (where ctrl+A was not working), user can do something like (domain used here is the one being used in test sessions below, and to be replaced with user’s website):
WebDocument  wdd = @"/dom[@domain='the-internet.herokuapp.com']";
wdd.ExecuteScript("document.getElementById('target').value=''");
  • They can also select the form and clear it.

Bug-3

For enter I used PressKeys("{Return}" and that worked successfully. You may also use Key Sequence {Return}
Sharing the link to the project, containing the test under name of Recording1.cs, along with a video of the Local run and on Browserstack

  • Imp. Pointers: You can pass the capability "browserstack.selenium_version" : "3.14.0", to do so.
  • The capability builder page automatically suggests the right version based on the device.

Resources

Links :

About

This repo is a working sample for best practices to be followed when running a Ranorex project on Remote Webdriver using Browsertack.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages