This is a demo project that shows how a page can be refreshed using Selenium C# and LambaTest. The refresh mechanism can be useful when you want to refresh the data on a page, and to avoid the StaleElementException.
To use LambaTest Selenium grid, you need to set environment variables from the terminal:For macOS:
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY
export HYPEREXECUTE_PLATFORM='windows 10'
export HYPEREXECUTE_WORKING_DIR='<full_path_project_directory>'
For Linux:
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY
export HYPEREXECUTE_PLATFORM='windows 10'
export HYPEREXECUTE_WORKING_DIR='<full_path_project_directory>'
For Windows:
set LT_USERNAME=LT_USERNAME
set LT_ACCESS_KEY=LT_ACCESS_KEY
set HYPEREXECUTE_PLATFORM='windows 10'
set HYPEREXECUTE_WORKING_DIR='<full_path_project_directory>'
Using the Automation Capabilities Generator , you can configure the browser settings you want to use in your tests: