<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andrea Maxwell</title>
    <description>The latest articles on DEV Community by Andrea Maxwell (@andreamaxwell).</description>
    <link>https://dev.to/andreamaxwell</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F980636%2F64b6cac7-35d2-45c8-9db4-4ccdadd1cdd2.png</url>
      <title>DEV Community: Andrea Maxwell</title>
      <link>https://dev.to/andreamaxwell</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andreamaxwell"/>
    <language>en</language>
    <item>
      <title>How To Refresh Page Using Selenium C# [Complete Tutorial]</title>
      <dc:creator>Andrea Maxwell</dc:creator>
      <pubDate>Mon, 30 Jan 2023 14:30:51 +0000</pubDate>
      <link>https://dev.to/testmuai/how-to-refresh-page-using-selenium-c-complete-tutorial-2711</link>
      <guid>https://dev.to/testmuai/how-to-refresh-page-using-selenium-c-complete-tutorial-2711</guid>
      <description>&lt;p&gt;When working on &lt;a href="https://www.lambdatest.com/learning-hub/web-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;web automation&lt;/a&gt; with &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt;, I encountered scenarios where I needed to refresh pages from time to time. When does this happen? One scenario is that I needed to refresh the page to check that the data I expected to see was still available even after refreshing. Another possibility is to clear form data without going through each input individually.&lt;/p&gt;

&lt;p&gt;But perhaps the refresh is necessary to avoid the most common &lt;a href="https://www.lambdatest.com/blog/49-common-selenium-exceptions-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium Exceptions&lt;/a&gt; like &lt;a href="https://www.lambdatest.com/blog/handling-stale-element-exceptions-in-selenium-java/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;*StaleElementReferenceException&lt;/a&gt;*.&lt;/p&gt;

&lt;p&gt;In this blog, we look at how to refresh page using &lt;a href="https://www.lambdatest.com/learning-hub/selenium-c-sharp-tutorial?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Selenium C#&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is StaleElementReferenceException in Selenium?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;StaleElementReferenceException&lt;/em&gt; means that the web element you try to find on the page has become stale.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1m540fn0rjvjunwbb5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1m540fn0rjvjunwbb5e.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But what does it mean that an element on a web page is stale, and how does it get into that state? The common reasons why this happens are because the element has been deleted from the page or it is no longer attached to the DOM. An element can be deleted from the DOM because either the user has left the page that the element was on or that page has been reloaded.&lt;/p&gt;

&lt;p&gt;It’s different from NoSuchElementException because, for the latter, the element was never found on the page, while with StaleElementreferenceException, the element has been found on the DOM, but the DOM changed.&lt;/p&gt;

&lt;p&gt;Consider an example of &lt;a href="https://ecommerce-playground.lambdatest.io/" rel="noopener noreferrer"&gt;LambdaTest eCommerce Playground&lt;/a&gt;; you locate a product, click on the product name, and open the product page. After validating the product, you go back to the previous page. The product is still there in the list, but the web element used to locate it might become stale. In this case, a refresh will ensure the element is found again, with no exception.&lt;/p&gt;

&lt;p&gt;In the next section, we will explore how to refresh page using Selenium C#&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/blog/regression-testing-what-is-and-how-to-do-it/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Regression testing&lt;/a&gt; - Complete Guide With Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Refresh Page using Selenium C#?
&lt;/h2&gt;

&lt;p&gt;So, how do you refresh page using Selenium C#?&lt;/p&gt;

&lt;p&gt;There are three ways to do this.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Using the &lt;strong&gt;Navigate().Refresh()&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using the &lt;strong&gt;Navigate().GoToUrl()&lt;/strong&gt; using the current page URL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simulating the keypress for the F5 key.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the next section of this blog on how to refresh page using Selenium C#, let’s see them in action with an example.&lt;/p&gt;

&lt;p&gt;Run your C# automation scripts across 3000+ environments. &lt;a href="https://accounts.lambdatest.com/register?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=login" rel="noopener noreferrer"&gt;Try LambdaTest Now!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/blog/regression-testing-what-is-and-how-to-do-it/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;What is Regression testing&lt;/a&gt; — Complete Guide With Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo Example: Refresh Page using Selenium C
&lt;/h2&gt;

&lt;p&gt;Let’s demonstrate how to refresh page using Selenium C#. I’ll use the same scenario, and demonstrate all three ways mentioned above, one by one.&lt;/p&gt;

&lt;p&gt;Basically, the test will look the same, except for the line of code that performs the actual refresh of the page. At the time of writing this blog, I’m using C# latest version — 4.6.0, NUnit as a testing framework, the &lt;a href="https://www.lambdatest.com/blog/page-object-model-tutorial-selenium-csharp/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Page Object Model design pattern&lt;/a&gt;, and the LambdaTest cloud-based grid for &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium automation testing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/2fN6GcZ3-fs"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Continuous quality clouds like LambdaTest let you perform manual and &lt;a href="https://www.lambdatest.com/automation-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;automation testing&lt;/a&gt; of your websites and mobile apps on an &lt;a href="https://www.lambdatest.com/online-device-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online device farm&lt;/a&gt; of 3000+ real browsers, devices, and operating system combinations. Its cloud-based &lt;a href="https://www.lambdatest.com/c-sharp-automation-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;C# automation testing&lt;/a&gt; platform lets you run automation tests using different testing frameworks like Selenium, &lt;a href="https://www.lambdatest.com/playwright?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/learning-hub/cypress-tutorial?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Cypress&lt;/a&gt;, and more. With &lt;a href="https://www.lambdatest.com/blog/what-is-parallel-testing-and-why-to-adopt-it/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;parallel testing&lt;/a&gt;, you can further cut down your &lt;a href="https://www.lambdatest.com/learning-hub/test-execution?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;test execution&lt;/a&gt; times by multiple folds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz054r0z1ep3p9zyf6qos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz054r0z1ep3p9zyf6qos.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WZlsHlReRww"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Subscribe to &lt;a href="https://www.youtube.com/c/LambdaTest?sub_confirmation=1" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel&lt;/a&gt; and stay updated with detailed tutorials around Selenium testing, &lt;a href="https://www.lambdatest.com/cypress-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Cypress testing&lt;/a&gt;, and more.&lt;/p&gt;

&lt;p&gt;POM is a design pattern used in automated &lt;a href="https://www.lambdatest.com/learning-hub/ui-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;UI testing&lt;/a&gt;, where web page controls are created in separate repositories called page objects. The page objects contain the web elements on their page, together with the methods that are applied to these elements. The test scripts then interact with the elements through these page objects.&lt;/p&gt;

&lt;p&gt;The main reason to use POM is that it makes the tests more readable, and it also promotes code reusability and easier maintenance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/blog/regression-testing-what-is-and-how-to-do-it/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Regression test&lt;/a&gt; — Complete Guide With Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Scenario
&lt;/h2&gt;

&lt;p&gt;Following is the test scenario used to refresh page using Selenium C#.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Navigate to the &lt;a href="https://www.lambdatest.com/blog/nunit-annotations-for-selenium-automation/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;LambdaTest Selenium Playground&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the first &lt;strong&gt;Simple Form Demo&lt;/strong&gt; link under the &lt;strong&gt;Input Forms&lt;/strong&gt; card.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go back to the first page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the &lt;strong&gt;Radio Buttons Demo&lt;/strong&gt; link under the &lt;strong&gt;Input Forms&lt;/strong&gt; card.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I’ll refresh the page between steps 3 and 4 to ensure that none of the links become stale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To get started, let’s look at the prerequisites for a new project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The NUnit framework. When creating a new project, you need to select the NUnit project type in Visual Studio.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frp8rwy9hfkt8pxt9z5ho.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frp8rwy9hfkt8pxt9z5ho.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add a name for the project, complete the next step, and create a brand-new test project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4vi7b6w2g0ex2swj7x8m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4vi7b6w2g0ex2swj7x8m.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The [SetUp] and [Test] are &lt;a href="https://www.lambdatest.com/blog/nunit-annotations-for-selenium-automation/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;NUnit annotations&lt;/a&gt;, which mark the methods following them. The SetUp method will run before each test, and the method marked as Test will be recognized as a test method.&lt;/p&gt;

&lt;p&gt;If you have the Test Explorer open (if not, you can open it from View → Test Explorer), you will see the test displayed.&lt;/p&gt;

&lt;p&gt;Assert is an NUnit class that allows us to make test validations. The current code will make our test pass every time because no real validation is added there.&lt;/p&gt;

&lt;p&gt;3- You can start the tests from the &lt;strong&gt;Test Explorer&lt;/strong&gt; pane.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkroncsfmj4yj1yh9c51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkroncsfmj4yj1yh9c51.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4- Once the test is executed, it will be updated with the result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgt9n3ph6vohdxws3k3j5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgt9n3ph6vohdxws3k3j5.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The class and test method can be renamed to reflect what is being tested. I renamed them &lt;em&gt;RefreshTest&lt;/em&gt; (the class) and &lt;em&gt;RefreshPage&lt;/em&gt; (the test).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F34spix3dbytwy9wyojsa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F34spix3dbytwy9wyojsa.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5- You’ll need to add the NuGet packages you’ll use in this project. You can add them from the user interface, from the &lt;strong&gt;Tools → NuGet Package Manager&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwyvkl1pvvxm0ebwjjj2o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwyvkl1pvvxm0ebwjjj2o.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6- Go to the &lt;strong&gt;Browser&lt;/strong&gt; tab and search for the needed packages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdknwi7r9sqlh79s1crq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdknwi7r9sqlh79s1crq5.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another way to install the required packages is by navigating to &lt;strong&gt;&lt;em&gt;Tools → NuGet Package Manager&lt;/em&gt;&lt;/strong&gt; and running the below command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  PM&amp;gt; NuGet\Install-Package Selenium.WebDriver -Version 4.6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Felrto2xspk61jfy6uky2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Felrto2xspk61jfy6uky2.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I’ll be using LambdaTest for the browser, I only need the Selenium.WebDriver package. To use the LambdaTest Selenium grid, you will need to define the capabilities using &lt;a href="https://www.lambdatest.com/capabilities-generator/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LambdaTest Capabilities Generator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here are the ones I use to test on Safari 15 and capture screenshots on every command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25z32e47kd13rseynt6u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25z32e47kd13rseynt6u.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to run the tests locally on the machine, you can skip this part and add the driver for the browser you want to use. Add another class to the project, call it something like PlaygroundHomePage.cs and let’s see what each class will contain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Online &lt;a href="https://www.lambdatest.com/automation-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Automated Testing&lt;/a&gt; Platform - Accelerate your release velocity with blazing fast test automation on cloud&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;In this blog section on how to refresh page using Selenium C#, we focus on the code implementation. Below is the test code for the &lt;strong&gt;&lt;em&gt;PlaygroundHomePage.cs&lt;/em&gt;&lt;/strong&gt; page object class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  using OpenQA.Selenium;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace RefreshSelenium
    {
        internal class PlaygroundHomePage
        {
            private IWebDriver driver;
            public PlaygroundHomePage(IWebDriver driver)
            {
                this.driver = driver;
            }

            public IWebElement SimpleFormLink =&amp;gt; driver.FindElement(By.LinkText("Simple Form Demo"));
            public IWebElement RadioButtonsLink =&amp;gt; driver.FindElement(By.LinkText("Radio Buttons Demo"));

            internal void NavigateToLink(IWebElement pageLink)
            {
                pageLink.Click();
            }
        }
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test script for &lt;strong&gt;&lt;em&gt;Refresh.cs&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   using OpenQA.Selenium;
    using OpenQA.Selenium.Remote;
    using OpenQA.Selenium.Safari;

    namespace RefreshSelenium
    {
        public class RefreshTest
        {

            private static IWebDriver driver;
            private static readonly string gridURL = "@hub.lambdatest.com/wd/hub";
            private static readonly string LT_USERNAME = Environment.GetEnvironmentVariable("LT_USERNAME");
            private static readonly string LT_ACCESS_KEY = Environment.GetEnvironmentVariable("LT_ACCESS_KEY");

            [SetUp]
            public void Setup()
            {
                SafariOptions capabilities = new SafariOptions();
                capabilities.BrowserVersion = "15.0";
                Dictionary&amp;lt;string, object&amp;gt; ltOptions = new Dictionary&amp;lt;string, object&amp;gt;();
                ltOptions.Add("username", LT_USERNAME);
                ltOptions.Add("accessKey", LT_ACCESS_KEY);
                ltOptions.Add("visual", true);
                ltOptions.Add("platformName", "MacOS Monterey");
                ltOptions.Add("build", "Refresh");
                ltOptions.Add("project", "RefrestTest");
                ltOptions.Add("w3c", true);
                ltOptions.Add("plugin", "c#-nunit");
                capabilities.AddAdditionalOption("LT:Options", ltOptions);
                driver = new RemoteWebDriver(new Uri($"https://{LT_USERNAME}:{LT_ACCESS_KEY}{gridURL}"), capabilities);
            }

            [Test]
            public void RefreshPage()
            {
                PlaygroundHomePage homePage = new PlaygroundHomePage(driver);
                driver.Navigate().GoToUrl("https://www.lambdatest.com/selenium-playground/");
                homePage.NavigateToLink(homePage.SimpleFormLink);
                driver.Navigate().Back();
                driver.Navigate().Refresh();
                homePage.NavigateToLink(homePage.RadioButtonsLink);  
            }

            [TearDown]
            public void TearDown()
            {
                driver.Quit();
            }
        }
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This blog section on how to refresh page using Selenium C# deals with the explanation of our test codes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PlaygroundHomePage.cs:&lt;/strong&gt; This class stores the elements that I’ll be interacting with. Since the test is short, I only use two links on the page, but the class can be as big as needed if it needs to contain more elements or actions on the elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02wad7kag4ld277glkmf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02wad7kag4ld277glkmf.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first part of any C# class is the one where we define all namespaces we need inside the class. Next, we have the variables and constructors we need in the page object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd2p6iopmjw6uwben4sxd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd2p6iopmjw6uwben4sxd.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to create a new instance of the &lt;a href="https://www.lambdatest.com/blog/selenium-webdriver-tutorial-with-examples/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium WebDriver&lt;/a&gt; that will be used later.&lt;/p&gt;

&lt;p&gt;Here, I have the elements I will interact with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6p2mxtfkz47ze26umnz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6p2mxtfkz47ze26umnz.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ll only be working on links now, so I used one of the &lt;a href="https://www.lambdatest.com/blog/locators-in-selenium-webdriver-with-examples/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Locators in Selenium &lt;/a&gt;— LinkText. If you are using other elements, you might want to consider different strategies, such as Id, TagName, or even &lt;a href="https://www.lambdatest.com/blog/complete-guide-for-using-xpath-in-selenium-with-examples/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;XPath&lt;/a&gt; and &lt;a href="https://www.lambdatest.com/blog/how-pro-testers-use-css-selectors-in-selenium-automation-scripts/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Selectors&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6i01zzrypypv0pcr2k0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6i01zzrypypv0pcr2k0.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case, using the Developer Tools to create complicated XPath or CSS Selectors wouldn’t make sense when I can use the visible link text. As a result, I added one method that could be reused on all links.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qudxgptuikv96niztiy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qudxgptuikv96niztiy.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m passing an &lt;strong&gt;IWebElement&lt;/strong&gt; parameter and using the Selenium .&lt;strong&gt;Click()&lt;/strong&gt; command to click it. Alternatively, as shown below, I could use a different method for each link I want to click.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8i126r6f00yzpxuh0a8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8i126r6f00yzpxuh0a8.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it on my page object. You can expect normal page object classes to be larger and have more complex functions — this one is just a demo.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Refresh.cs&lt;/strong&gt;: Just like the page object class, it begins with the using statements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1g1ijjnmk6mqd5eh32n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1g1ijjnmk6mqd5eh32n.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the class, I need to declare the variables to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6szir8ilt98qajc0ejxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6szir8ilt98qajc0ejxk.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;driver&lt;/strong&gt; variable is the one I use to interact with the browser. The following three variables: &lt;strong&gt;gridURL, LT_USERNAME&lt;/strong&gt;, and &lt;strong&gt;LT_ACCESS_KEY&lt;/strong&gt;, are related to my LambdaTest account.&lt;/p&gt;

&lt;p&gt;In the meantime, I have them saved as environment variables, and my code reads them from there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[SetUp] method&lt;/strong&gt;: In the below test script, all the lines except the last one are directly copied from the LambdaTest Automation Capabilities Generator I mentioned above. The configuration I want to use: is Safari 15.0. But you can choose whatever suits your needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn3jfrnb2a1if9xgcn7bg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn3jfrnb2a1if9xgcn7bg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last line creates a &lt;strong&gt;new RemoteWebDriver&lt;/strong&gt; using my LambdaTest credentials. If you want to run the tests locally, you can add a NuGet package of the desired driver, such as Selenium.WebDriver.ChromeDriver, and update the setup to use a new ChromeDriver instance like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    private static IWebDriver driver;

    [SetUp]
    public void Setup()
    {            
            driver = new ChromeDriver();
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;[Test] method&lt;/strong&gt;: In the first line of code, I created a new instance of the &lt;strong&gt;&lt;em&gt;PlaygroundHomePage&lt;/em&gt;&lt;/strong&gt; object. Next, I used the Navigate*&lt;strong&gt;().GoToUrl()&lt;/strong&gt;* method to open my desired page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmc3yrfx6knu2p44ne2h1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmc3yrfx6knu2p44ne2h1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But before we proceed, let’s briefly discuss the &lt;strong&gt;&lt;em&gt;Navigate&lt;/em&gt;&lt;/strong&gt; method in Selenium. The &lt;strong&gt;&lt;em&gt;Navigate()&lt;/em&gt;&lt;/strong&gt; method returns an &lt;strong&gt;&lt;em&gt;INavigation&lt;/em&gt;&lt;/strong&gt; interface on which we can perform several actions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtbjovcsolgs9y8mq8yu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtbjovcsolgs9y8mq8yu.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have GoToUrl*&lt;strong&gt;()&lt;/strong&gt;*, which everybody uses to navigate a specific web page. You are probably already familiar with it, if not before, then from the lines of code we just discussed.&lt;/p&gt;

&lt;p&gt;Then, we have the browser actions: &lt;em&gt;Back()&lt;/em&gt;, &lt;em&gt;Forward()&lt;/em&gt;, and &lt;em&gt;Refresh()&lt;/em&gt;. They are all rather self-explanatory. What they basically do is simulate the respective button press in the browser.&lt;/p&gt;

&lt;p&gt;Moving on with the code, after opening the web page, I called the generic method that navigates between links, and I passed it the desired element as a parameter:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8s5yu84y4apayk2ox0xf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8s5yu84y4apayk2ox0xf.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next part is where &lt;strong&gt;&lt;em&gt;Navigate()&lt;/em&gt;&lt;/strong&gt; comes into play again — I went back to the home page (to continue to verify the links), then I refreshed the page, to make sure that every element is loaded and none of them are stale.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5z217pjtr0f75qbirrnb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5z217pjtr0f75qbirrnb.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the last line of code is navigating again on one of the links, passing a different parameter. I also added a TearDown method — to close the browser window after my test is done, using the &lt;strong&gt;&lt;em&gt;[TearDown]&lt;/em&gt;&lt;/strong&gt; NUnit annotation, which marks a method that will run after each test execution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7o7yy1nbfu8s75p25u7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7o7yy1nbfu8s75p25u7.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Execution
&lt;/h2&gt;

&lt;p&gt;Now that everything is clear, you can start the execution from Visual Studio’s Test Explorer the same way as before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzy405dp7xr9u7nxys8au.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzy405dp7xr9u7nxys8au.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m running my tests on the LambdaTest cloud &lt;a href="https://www.lambdatest.com/blog/selenium-grid-setup-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium Grid&lt;/a&gt;. So once the test passes, you can only see the test result on the &lt;a href="https://accounts.lambdatest.com/login?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=login" rel="noopener noreferrer"&gt;LambdaTest Automation Dashboard&lt;/a&gt;. But if you run it locally, you will see the browser window open up and all the steps performed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkiynxkrtxgbicdmq56hx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkiynxkrtxgbicdmq56hx.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the left, you can see a video recording of the test, and on the right, configuration information (the capabilities I added in the setup) and details on each step. You can also reply to the video from a selected step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fthwj8g3s5xpkfdmetb85.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fthwj8g3s5xpkfdmetb85.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also added the screenshot capability so that each step will have a corresponding screenshot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dgsjvi4axbez983cw9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dgsjvi4axbez983cw9v.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is especially useful if any steps fail and a bug is found. This way, I have all the information I need to report the bug.&lt;/p&gt;

&lt;h3&gt;
  
  
  Refresh the Page with SendKeys()
&lt;/h3&gt;

&lt;p&gt;In this blog section on how to refresh page using Selenium C#, let’s look at another way of refreshing the page. This time we’ll use the &lt;strong&gt;&lt;em&gt;SendKeys()&lt;/em&gt;&lt;/strong&gt; command in &lt;a href="https://www.lambdatest.com/blog/how-to-use-selenium-sendkeys/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium SendKeys&lt;/a&gt;. The page object class stays the same, and the test code will look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   using OpenQA.Selenium;
    using OpenQA.Selenium.Remote;
    using OpenQA.Selenium.Safari;

    namespace RefreshSelenium
    {
        public class RefreshTest
        {

            private static IWebDriver driver;
            private static readonly string gridURL = "@hub.lambdatest.com/wd/hub";
            private static readonly string LT_USERNAME = Environment.GetEnvironmentVariable("LT_USERNAME");
            private static readonly string LT_ACCESS_KEY = Environment.GetEnvironmentVariable("LT_ACCESS_KEY");

            [SetUp]
            public void Setup()
            {
                SafariOptions capabilities = new SafariOptions();
                capabilities.BrowserVersion = "15.0";
                Dictionary&amp;lt;string, object&amp;gt; ltOptions = new Dictionary&amp;lt;string, object&amp;gt;();
                ltOptions.Add("username", LT_USERNAME);
                ltOptions.Add("accessKey", LT_ACCESS_KEY);
                ltOptions.Add("visual", true);
                ltOptions.Add("platformName", "MacOS Monterey");
                ltOptions.Add("build", "Refresh");
                ltOptions.Add("project", "RefrestTest");
                ltOptions.Add("w3c", true);
                ltOptions.Add("plugin", "c#-nunit");
                capabilities.AddAdditionalOption("LT:Options", ltOptions);
                driver = new RemoteWebDriver(new Uri($"https://{LT_USERNAME}:{LT_ACCESS_KEY}{gridURL}"), capabilities);
            }

            [Test]
            public void RefreshPage()
            {
                PlaygroundHomePage homePage = new PlaygroundHomePage(driver);
                driver.Navigate().GoToUrl("https://www.lambdatest.com/selenium-playground/");
                homePage.NavigateToLink(homePage.SimpleFormLink);
                driver.Navigate().Back();
                driver.Navigate().Refresh();
                homePage.RadioButtonsLink.SendKeys(Keys.F5);
                homePage.NavigateToLink(homePage.RadioButtonsLink);  
            }

            [TearDown]
            public void TearDown()
            {
                driver.Quit();
            }
        }
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The only thing that differs in this version is the line of code that refreshes the page.&lt;/p&gt;

&lt;p&gt;What we need here is the &lt;strong&gt;&lt;em&gt;Selenium SendKeys()&lt;/em&gt;&lt;/strong&gt; command. &lt;strong&gt;&lt;em&gt;SendKeys()&lt;/em&gt;&lt;/strong&gt; is a Selenium keyboard action performed on a web element. It’s typically used to enter text inside an element such as an input (think form fields such as username and password, search bars, contact forms, and so on).&lt;/p&gt;

&lt;p&gt;In my specific case, I am not trying to add text to use any element on the page. I am using the &lt;strong&gt;RadioButtonsLink&lt;/strong&gt; from the LambdaTest Playground Home page because it’s an element I’m using in my test anyway. I don’t want to add additional code to the page object class.&lt;/p&gt;

&lt;p&gt;The test execution is done the same way and will have the same result as before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: 30 Top &lt;a href="https://www.lambdatest.com/blog/automation-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Automated Testing Tools&lt;/a&gt; In 2022&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Refresh the Page using Navigate().GoToUrl()
&lt;/h2&gt;

&lt;p&gt;Now, there is another way to refresh page using Selenium C#. I will stick to the same scenario while keeping the same setup and tear down. The only thing that changes is the line that refreshes the page.&lt;/p&gt;

&lt;p&gt;Let’s refresh page using Selenium C# with &lt;strong&gt;Navigate()&lt;/strong&gt;, but this time using the &lt;strong&gt;GoToUrl()&lt;/strong&gt; command. The class will now look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   using OpenQA.Selenium;
    using OpenQA.Selenium.Remote;
    using OpenQA.Selenium.Safari;

    namespace RefreshSelenium
    {
        public class RefreshTest
        {

            private static IWebDriver driver;
            private static readonly string gridURL = "@hub.lambdatest.com/wd/hub";
            private static readonly string LT_USERNAME = Environment.GetEnvironmentVariable("LT_USERNAME");
            private static readonly string LT_ACCESS_KEY = Environment.GetEnvironmentVariable("LT_ACCESS_KEY");

            [SetUp]
            public void Setup()
            {
                SafariOptions capabilities = new SafariOptions();
                capabilities.BrowserVersion = "15.0";
                Dictionary&amp;lt;string, object&amp;gt; ltOptions = new Dictionary&amp;lt;string, object&amp;gt;();
                ltOptions.Add("username", LT_USERNAME);
                ltOptions.Add("accessKey", LT_ACCESS_KEY);
                ltOptions.Add("visual", true);
                ltOptions.Add("platformName", "MacOS Monterey");
                ltOptions.Add("build", "Refresh");
                ltOptions.Add("project", "RefrestTest");
                ltOptions.Add("w3c", true);
                ltOptions.Add("plugin", "c#-nunit");
                capabilities.AddAdditionalOption("LT:Options", ltOptions);
                driver = new RemoteWebDriver(new Uri($"https://{LT_USERNAME}:{LT_ACCESS_KEY}{gridURL}"), capabilities);
            }

            [Test]
            public void RefreshPage()
            {
                PlaygroundHomePage homePage = new PlaygroundHomePage(driver);
                driver.Navigate().GoToUrl("https://www.lambdatest.com/selenium-playground/");
                homePage.NavigateToLink(homePage.SimpleFormLink);
                driver.Navigate().Back();
                driver.Navigate().GoToUrl(driver.Url);
                homePage.NavigateToLink(homePage.RadioButtonsLink);  
            }

            [TearDown]
            public void TearDown()
            {
                driver.Quit();
            }
        }
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once again, the Setup() and the TearDown() remain the same. What happens here differently is that Selenium uses the current page URL to navigate to it instead of giving the exact URL as a parameter. It’s similar to manually pressing the Enter key inside the browser’s address bar. You will get the same result if you run the test with this code.&lt;/p&gt;

&lt;p&gt;Master Selenium automation testing with C# with this certification and establish your credibility as a tester.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9a49qs52xd8opldwgf1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9a49qs52xd8opldwgf1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: 30 Top &lt;a href="https://www.lambdatest.com/blog/automation-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jan30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Tools for automation testing&lt;/a&gt; In 2022&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;This blog shows how to refresh page using Selenium C#, with NUnit as a testing framework, and a demo of the Page Object Model design pattern.&lt;/p&gt;

&lt;p&gt;If you went over all the steps, you should now understand what the &lt;strong&gt;&lt;em&gt;StaleElementException&lt;/em&gt;&lt;/strong&gt; is and how you can avoid it. You can also use the refresh page for different scenarios, the same ones where you would need to refresh the page if performing the tests in the browser manually.&lt;/p&gt;

&lt;p&gt;The refresh can be done in multiple ways; it is up to you to decide which works best.&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>offers</category>
    </item>
    <item>
      <title>Understanding The Difference Between Cross Browser Testing &amp; Responsive Testing</title>
      <dc:creator>Andrea Maxwell</dc:creator>
      <pubDate>Mon, 28 Nov 2022 20:52:21 +0000</pubDate>
      <link>https://dev.to/testmuai/understanding-the-difference-between-cross-browser-testing-responsive-testing-il6</link>
      <guid>https://dev.to/testmuai/understanding-the-difference-between-cross-browser-testing-responsive-testing-il6</guid>
      <description>&lt;p&gt;The ubiquity of the internet today is undeniable. It is thus incumbent upon website developers to make sure that web user’s online experience is easy, convenient, hassle-free, and even enjoyable, if possible. This requires a well-organized release cycle where developers and testers do their best to deliver a robust and competitive product to the market. However, we often forget or get confused between the literal meaning of Responsive testing and Cross Browser Testing. This underscores the importance of cross browser testing and responsive testing. Both are crucial in website development but are quite distinct from each other. Both also happen to be offered by LambdaTest and we will be looking at each of them in this article after understanding the basic difference between the two types of testing.&lt;/p&gt;

&lt;p&gt;Cross browser testing deals with functionality and interoperability, while responsive web testing focuses on aesthetics and adaptability. The former is thus concerned with what browser web users are using; the latter, on the other hand, is focused on what devices web users are using. Still confused? Don’t worry! I will be talking about them in detail. By the end of this article, I will help you evade the ambiguity between Cross browser testing and Responsive testing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Run your &lt;a href="https://www.lambdatest.com/jest?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Jest&lt;/a&gt; automation tests in massive parallel across multiple browser and OS combinations with LambdaTest.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What Is Responsive Testing?
&lt;/h2&gt;

&lt;p&gt;The generation we live in, demands for convenience. Gone are the days when PC or Laptop were the only ways of accessing a website. Advancement in technology of mobile phones, tabs, and high-speed internet has significantly impacted the user’s preference for accessing the web.&lt;br&gt;
&lt;a href="https://www.lambdatest.com/responsive-test-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Responsive testing&lt;/a&gt; is a process that ensures the rendering of web pages across viewports of multiple devices. Its end-goal is to make sure that web pages look good &amp;amp; provide relevant information to the website visitors on every device.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kngroxz1s9aln3aen1r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kngroxz1s9aln3aen1r.gif" width="600" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Which are the &lt;a href="https://www.lambdatest.com/blog/automation-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;best automation testing tools&lt;/a&gt; in 2023 that have climbed the top of the ladder so far?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With this Responsive testing tutorial for beginners, you will learn how to perform Responsive Testing of your website on the LambdaTest platform.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ExPeFxpsdpY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Is Responsive Testing Important?
&lt;/h2&gt;

&lt;p&gt;Imagine the number of devices your customers may be using. Screen size for mobile will be far different than that of desktop devices. Also, not all mobile will offer the same viewport or screen resolution. Now, are you going to come up with a dedicated web page for each device view? Imagine how many devices that would be. For that purpose, organizations prefer to opt for Responsive Web Design(RWD). The idea behind RWD is to save the time and effort required to create dedicated web pages for different screen sizes. So, you develop a single website or web-app with RWD to help it render seamlessly across different devices. Post development, comes testing. The testing procedure for validating the RWD works as intended is what we term as Responsive Testing.&lt;/p&gt;

&lt;p&gt;Similar to Cross browser testing, Responsive testing is critical for offering your customers a good UI &amp;amp; UX. If a site is unresponsive then the content of the web page stays static irrespective of the screen resolution used to view the website. So you miss out on relaying the relevant information to your customers.&lt;/p&gt;

&lt;p&gt;Now, let us have a look at a non-responsive website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcvg48vhm3egw6mxtubdo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcvg48vhm3egw6mxtubdo.png" width="413" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Source- Unresponsive Website&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;In this blog, we covered the top &lt;a href="https://www.lambdatest.com/blog/10-top-codeless-testing-tools-2021/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;codeless automation testing tools&lt;/a&gt; out there for 2021 (with features). Read now to choose the best that suits your needs.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Did you notice the hindrance from the end-user point of view? Now, let us evaluate a responsive website. I will be demonstrating LambdaTest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54io0zft1o02x4yxuzx7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54io0zft1o02x4yxuzx7.png" width="411" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Responsive Website&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Did you notice that the only scroll bar here is for vertical-scrolling unlike the unresponsive website where we had a scroll bar for horizontal-scrolling as well? That is not all. The content is auto adjusted and you can view the whole website in a neat and presentable manner, along with a hamburger menu on top to help you navigate through different tabs of a web product. Visit LambdaTest homepage to understand how the content of web-page has been adjusted into a mobile screen resolution.&lt;/p&gt;

&lt;p&gt;Our article on ‘&lt;a href="https://www.lambdatest.com/blog/9-mistakes-to-avoid-while-optimizing-your-site-for-mobile-devices/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;9 Mistakes to Avoid While Optimizing Your Site for Mobile Devices&lt;/a&gt;’ explains that optimizing a website to be mobile-friendly is important as it ensures proper rendering across a range of devices. There is no need to create a mobile version of the same website. Consequently, costs are reduced and it won’t take as many man-hours to complete.&lt;/p&gt;

&lt;p&gt;Perform &lt;a href="https://www.lambdatest.com/responsive-test-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Responsive Testing&lt;/a&gt; On 50+ Mobile Views With LT Browser&lt;/p&gt;

&lt;p&gt;In this detailed walkthrough of LT Browser tutorial video, we will help you get started with LT Browser.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Vn1RX9GMXtw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learn why Python is the top choice for automation testing. This comprehensive tutorial provides a step-by-step guide to &lt;a href="https://www.lambdatest.com/blog/python-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;automation testing using python&lt;/a&gt; to help you streamline your testing process.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What Is Cross Browser Testing?
&lt;/h2&gt;

&lt;p&gt;Cross browser testing is a process of testing a website or web-app across numerous browsers, browser versions running on different operating systems to ensure rendering of the website stays as intended.&lt;/p&gt;

&lt;p&gt;The primary reason of &lt;a href="https://www.lambdatest.com/blog/performing-cross-browser-testing-with-lambdatest/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;performing cross browser testing&lt;/a&gt; lies with the differences between rendering engines of different browsers. Every browser possesses a distinctive rendering engine for summoning your web elements when someone types your website’s URL in the address bar. Basically, rendering engine of Google Chrome will interpret the code of your website differently than rendering engine of Mozilla Firefox, Safari, Opera etc. Also, every browser version will have a unique rendering engine too. So, Chrome 68 may differ in rendering a website than Chrome 69, Chrome 67, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7reaonvjkvod04nhl7o2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7reaonvjkvod04nhl7o2.jpg" width="534" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;In this Selenium &lt;a href="https://www.lambdatest.com/blog/automation-testing-with-selenium-javascript/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;javascript for automation testing&lt;/a&gt; tutorial, as we deep dive into the basic concepts, explained the best practices and executed automation scripts with JavaScript on cloud-based Selenium Grid.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why Is Cross Browser Testing Important?
&lt;/h2&gt;

&lt;p&gt;Imagine all the hard work you put in for developing a top-notch website using Google Chrome, only to watch it fail miserably on Safari, IE, any other desktop browser, or mobile browser.&lt;/p&gt;

&lt;p&gt;If you go live with your web-app without incorporating &lt;a href="https://www.lambdatest.com/web-based-browser-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;web based browser&lt;/a&gt; testing in your SDLC then you are at a potential risk of offering a &lt;a href="https://www.lambdatest.com/blog/top-17-ui-design-mistakes-that-leads-to-failure-of-your-website/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;troublesome user-experience&lt;/a&gt; to your website visitors. Not only are you failing to attract a new customer for your web product, but you are also letting down your existing users to quit on your web product. It’s simple, If you won’t offer them a good, consistent user experience then somebody else will.&lt;/p&gt;

&lt;p&gt;UX is not the only reason, you also have to keep in mind the UI(User Interface) of your web product. Cross browser testing will ensure better accessibility and readability to your users. For instance, say you are creating an HTML form, you are declaring different form input types, one such HTML input type is of &lt;strong&gt;Range&lt;/strong&gt; for the purpose of specifying the annual income, bulk order etc. Range input type in HTML is pivotal for every website or web-app. However, it is not rendered in a consistent manner across different browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffocp74huaw6iv3q7ieg6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffocp74huaw6iv3q7ieg6.png" width="344" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Range input type In IE11&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbtejkq5glf264447ma2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbtejkq5glf264447ma2.png" width="246" height="79"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Range input type in Google Chrome 72&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Given these points, it can be said that a website’s lack of browser compatibility is detrimental; rather than switch browsers, web users are likely to look for a different website.&lt;/p&gt;

&lt;p&gt;Now, that we realize how imperative Cross browser testing is for a website! The questions arise on the approach to perform cross browser testing&lt;/p&gt;

&lt;p&gt;Well, there are 2 approaches to perform cross browser testing.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Manual Cross Browser Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automated Cross Browser Testing&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both of the approaches have significance in their own ways. &lt;a href="https://www.lambdatest.com/blog/34-ways-to-save-time-on-manual-cross-browser-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Manual cross browser testing&lt;/a&gt; is important for test verification. Automated cross browser testing is important for test validation point of view.&lt;/p&gt;

&lt;p&gt;Automated cross browser testing will help to load off the repetitive test cases and &lt;a href="https://www.lambdatest.com/blog/10-ways-to-speed-up-your-test-cycles/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;speed up your test&lt;/a&gt; cycles. Manual cross browser testing will help to provide better test scenarios for generating your automation test scripts.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learn why Python is the top choice for automation testing. This comprehensive tutorial provides a step-by-step guide to &lt;a href="https://www.lambdatest.com/blog/python-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;python for automation testing&lt;/a&gt; to help you streamline your testing process.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Common Goal Of Cross Browser Testing &amp;amp; Responsive Testing
&lt;/h2&gt;

&lt;p&gt;By far, I am sure we are well versed with the difference between the two terms i.e. Cross browser testing &amp;amp; Responsive testing.&lt;br&gt;
Well, can you think of the common goal for performing these two different types of testing?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5m1qxqk77wbyz85t94xp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5m1qxqk77wbyz85t94xp.gif" width="600" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time’s up!!&lt;/strong&gt; Common goal would be &lt;strong&gt;to provide a flawless user journey to your customers&lt;/strong&gt;. Another key thing to highlight here is that responsive testing happens to be a subset of Cross browser testing.&lt;/p&gt;
&lt;h2&gt;
  
  
  Achieving The Common Goal With LambdaTest
&lt;/h2&gt;

&lt;p&gt;LambdaTest is a cross browser testing cloud which offering more than 3000+ real browsers and browser versions running on different OS to help you deliver a consistent website or web page to your users. With LambdaTest, you can do both, Cross browser testing as well as Responsive testing / &lt;a href="https://www.lambdatest.com/mobile-view-website?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;mobile website test.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Performing Cross Browser Testing With LambdaTest
&lt;/h2&gt;

&lt;p&gt;LambdaTest offers an intuitive UI for performing both manual, and automated cross browser testing with Selenium Grid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manual Cross Browser Testing *&lt;em&gt;— LambdaTest offers a feature called *&lt;/em&gt;“Real Time Testing”&lt;/strong&gt; that allows you to perform live-interactive testing with your web-app by providing a VM(Virtual Machine) based on your selected OS + browser configuration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3128d1hige2mojfxdnbo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3128d1hige2mojfxdnbo.png" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, performing live-interactive testing will definitely be time-consuming. What if you want to have a quick look of your website to validate &lt;a href="https://www.lambdatest.com/feature?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;browser compatibility testing&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;LambdaTest offers &lt;strong&gt;Screenshot testing&lt;/strong&gt; to help you capture screenshots in bulk for your website over different desktop and mobile browsers. Select up to 25 configuration of your desired browser + OS configuration in a single test session. You can switch to &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;mobile view of website&lt;/a&gt; using the toggle next to Desktop icon. Simply, place the URL you wish to test, select your configurations and hit the Capture button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhynooemlv2oalosimk67.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhynooemlv2oalosimk67.png" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;In this Appium tutorial, learn about &lt;a href="https://www.lambdatest.com/appium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Appium automation testing&lt;/a&gt; and its benefits for mobile automation testing. Take a look at how Appium works and see how to perform Appium testing of your mobile applications.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Automated Cross Browser Testing — As explained in earlier section, &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;automated cross browser testing&lt;/a&gt; is relevant to pace the test cycles by automating the repetitive test cases. LambdaTest offers a cloud-based Selenium Grid to help you execute your automation test scripts on more than 3000 real browsers and browser versions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxr056usjg2pe9l2pmfai.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxr056usjg2pe9l2pmfai.jpg" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.lambdatest.com/blog/lambdatest-now-live-with-an-online-selenium-grid-for-automated-cross-browser-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium Grid &lt;/a&gt;offered by LambdaTest provides compatibility with every &lt;a href="https://www.lambdatest.com/support/docs/getting-started-with-lambdatest-automation/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=support_doc" rel="noopener noreferrer"&gt;test automation framework that supports Selenium.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LambdaTest also offer &lt;a href="https://www.lambdatest.com/support/docs/integrations-with-ci-cd-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=support_doc" rel="noopener noreferrer"&gt;integrations with multiple CI/CD tools&lt;/a&gt; to help you speed up your go-to-market launch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F122edzolr3faxd6so1e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F122edzolr3faxd6so1e6.png" width="800" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also perform parallel testing to run multiple automation tests simultaneously.&lt;/p&gt;

&lt;p&gt;You can find all the logs of your test execution such as network logs, command logs, Selenium logs, command-by-command screenshots, video recording and more.&lt;/p&gt;

&lt;p&gt;When you execute automated cross browser testing then reporting becomes vital to keep a track of numerous test case execution. &lt;a href="https://www.lambdatest.com/blog/lambdatest-launches-api-for-selenium-automation/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;LambdaTest recently went live with restful API&lt;/a&gt; to help your extract your test results from LambdaTest in order to build powerful reports.&lt;/p&gt;

&lt;p&gt;Still, it should be noted that despite the automation, observing the running script with pen and paper at the ready is a useful technique. This way, you can spot problems that even automated checks can’t. &lt;a href="https://www.lambdatest.com/blog/creating-browser-compatibility-matrix-for-testing-workflow/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Creating a browser compatibility matrix&lt;/a&gt; is also a helpful technique, as it is a means to make sure that you cover all the possible browser and operating system versions along with all the devices.&lt;/p&gt;

&lt;p&gt;This certification is for anyone who wants to stay ahead among professionals who are growing their career in Selenium automation testing.&lt;/p&gt;

&lt;p&gt;Here’s a short glimpse of the Selenium 101 certification from LambdaTest:&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qx9FPFfJm7E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qx9FPFfJm7E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Get started with this complete &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;automation testing using Selenium&lt;/a&gt; tutorial. Learn what Selenium is, its architecture, advantages and more for automated cross browser testing.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Performing Responsive Testing With LambdaTest
&lt;/h2&gt;

&lt;p&gt;Before I tell you about performing responsive testing with LambdaTest. I would like to inform you the oldest trick in the book to perform responsive testing. Open the website you wish to test on your local browser window and minimize your browser. Now, pick any corner of your browser window and drag it either horizontally, vertically, or diagonally. You will be able to notice whether your website is changing dynamically according to browser window’s size.&lt;/p&gt;

&lt;p&gt;Main drawback here is that when you are testing responsiveness of your website through this approach then you are viewing everything from the perspective of your local browser’s rendering engine. In reality, your users may be using Safari, Opera, Yandex, Edge, IE, or any other browser. A different browser possessing a different rendering engine over a different device than yours can have a major difference in the look and feel, in comparison to your browser-window dragging approach. This is why you need to perform it over different devices through device labs, or emulators/simulators. Device labs could be very expensive and unaffordable to many small start ups, freelancers etc., so a good choice would be to go with a cloud-based service provider such as LambdaTest.&lt;/p&gt;

&lt;p&gt;LambdaTest allows you to perform responsive testing on 46 mobile and desktop devices in a single go. Just provide the URL you wish to test and hit the &lt;strong&gt;Generate&lt;/strong&gt; button. You can change the defer time for capturing screenshot, adjust the monitor size, can view a device in portrait or landscape mode according to your reference and do a lot more. Follow our &lt;a href="https://www.lambdatest.com/support/docs/responsive-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=support_doc" rel="noopener noreferrer"&gt;documentation on Responsive testing&lt;/a&gt; to know it all.&lt;br&gt;
You can use &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LT Browser&lt;/a&gt;, a &lt;a href="https://www.lambdatest.com/mobile-friendly-tester?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jun_15&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;mobile friendly tester &lt;/a&gt;to build, test, and debug your responsive website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4k3uklbkmimrqxwre9dk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4k3uklbkmimrqxwre9dk.png" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Increasing Importance
&lt;/h2&gt;

&lt;p&gt;With increasing updates in various browsers, many web elements are being deprecated, and many web elements that were previously unsupported among majority of browsers are now being cross browser compatible. Without a doubt, both cross browser testing and responsive testing are important, especially in today’s internet-dependent world. Keep in mind, that responsive testing is a subset of cross browser testing, and both are critical in delivering a pixel-perfect user journey to every visitor on your website. Happy Testing! 🙂&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
  </channel>
</rss>
