<?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: Garima Tiwari</title>
    <description>The latest articles on DEV Community by Garima Tiwari (@garima_writes).</description>
    <link>https://dev.to/garima_writes</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%2F806272%2Fe3dfb987-a551-4611-b25a-478eacc414ae.jpg</url>
      <title>DEV Community: Garima Tiwari</title>
      <link>https://dev.to/garima_writes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/garima_writes"/>
    <language>en</language>
    <item>
      <title>How to Inspect or Locate Element using UIAutomatorViewer in Appium: Tutorial</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Fri, 22 Apr 2022 19:04:23 +0000</pubDate>
      <link>https://dev.to/garima_writes/how-to-inspect-or-locate-element-using-uiautomatorviewer-in-appium-tutorial-4966</link>
      <guid>https://dev.to/garima_writes/how-to-inspect-or-locate-element-using-uiautomatorviewer-in-appium-tutorial-4966</guid>
      <description>&lt;p&gt;Appium is widely used for automated &lt;a href="https://www.browserstack.com/app-live" rel="noopener noreferrer"&gt;mobile app testing&lt;/a&gt;. It helps execute automated tests on native and hybrid apps for faster results. To fulfill the growing demand for apps that serve, delight, and retain users, the need for &lt;a href="https://www.browserstack.com/app-automate" rel="noopener noreferrer"&gt;automated app testing&lt;/a&gt; continues to increase. That is why Appium is widely used to perform automation testing, which helps development and testing professionals deliver high-end apps within tight deadlines.&lt;/p&gt;

&lt;p&gt;For any application, User Interface (UI) plays a major role. It is the UI elements that the end-user interacts with. Thus, it is very important to &lt;a href="https://www.browserstack.com/guide/ui-testing-guide" rel="noopener noreferrer"&gt;test UI elements&lt;/a&gt; individually. These elements can be located using GUI (Graphic User Interface) tools like UIAutomatorViewer, and then tested with desired scenarios involving user interactions.&lt;/p&gt;

&lt;p&gt;This article will discuss different ways to inspect or locate UI elements using UIAutomatorViewer in Appium.&lt;/p&gt;

&lt;p&gt;Before we begin, let’s look at different ways used to define a UI Element.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ways of defining a UI Element
&lt;/h2&gt;

&lt;p&gt;UI Elements can be defined by ID, ClassName, Name, Accessibility ID, XPath.&lt;/p&gt;

&lt;p&gt;To understand how to inspect or locate a UI element with UIAutomatorViewer, this article will use the example of the Android Calculator. The aim is to locate the element that is the + button with the help of UIAutomator View, and Click on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up UIAutomatorViewer
&lt;/h2&gt;

&lt;p&gt;Before creating the script to inspect the desired element, let’s look at setting up UIAutomatorViewer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites for setting up UIAutomatorViewer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/appium/appium-ios-device" rel="noopener noreferrer"&gt;Install Appium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/studio" rel="noopener noreferrer"&gt;Install Android Studio and SDK Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://java.com/en/download/" rel="noopener noreferrer"&gt;Install Java&lt;/a&gt; and set up the &lt;a href="https://stackoverflow.com/questions/10687188/inno-setup-setting-java-environment-variable" rel="noopener noreferrer"&gt;environment variables&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.eclipse.org/downloads/packages/" rel="noopener noreferrer"&gt;Install Eclipse IDE for Java&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Connect the Android device where the test application is to be tested. The system must have Appium Setup using USB&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%2F7ntlnnjijbqlrwjynfjn.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%2F7ntlnnjijbqlrwjynfjn.png" alt="Appium Server upon launch" width="800" height="274"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Once the Appium Server is launched&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Open UIAutomatorViewer
&lt;/h2&gt;

&lt;p&gt;This can be done by either of the following methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;entering uiautomatorviewer in the command prompt&lt;/li&gt;
&lt;li&gt;opening uiautomatorviewer.bat file in the Android installation folder with the following command: Android &amp;gt;&amp;gt; Android-SDK &amp;gt;&amp;gt; Tools &amp;gt;&amp;gt; UIAutomatorViewer.bat&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Locating Element using UIAutomatorViewer
&lt;/h2&gt;

&lt;p&gt;This article will explore a test case demonstrating how to locate the + button on the Android Calculator App using Java and click it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;the UIAutomatorViewer is opened, open the target app that has to be tested – Android Calculator in this example.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the Device Screenshot Icon to display the screen of the Android device in the window. It looks like the screenshot below.&lt;/p&gt;&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%2Fuytxg7cyvycmza5ki2xc.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%2Fuytxg7cyvycmza5ki2xc.png" alt="Image description" width="800" height="621"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;UIAutomatorViewer Window with Android Calculator App&lt;/em&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Move the cursor on the target element that has to be located – the + button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note down the values mentioned in the Node Detail Tab of the UIAutomatorViewer window.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note the values of Text, ResourceID, Class, Package, and Content Desc. These values will be used when writing the test script to locate the element. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Script to Identify the + Button in the Android Calculator App
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Find the &lt;strong&gt;+ Button&lt;/strong&gt; using &lt;strong&gt;ID&lt;/strong&gt; and click it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;driver.findElement(By.id("com.android.calculator2:id/plus")).click();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;driver.findElementById("com.android.calculator2:id/plus").click();&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the &lt;strong&gt;+ Button&lt;/strong&gt; using &lt;strong&gt;Accessibility ID Property&lt;/strong&gt; and click it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;driver.findElementByAccessibilityId("plus").click();&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the &lt;strong&gt;+ Button&lt;/strong&gt; using &lt;strong&gt;XPath&lt;/strong&gt; and click it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;driver.findElement(By.xpath("//android.widget.Button[@content-desc = 'plus']")).click();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;driver.findElement(By.xpath("//*[@content-desc = 'plus']")).click();&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the &lt;strong&gt;+ Button&lt;/strong&gt; using &lt;strong&gt;ClassName **and **findElements(&lt;/strong&gt;) method and click it
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List&amp;lt;MobileElement&amp;gt; elements = driver.findElements(By.className("android.widget.Button"));
for(MobileElement element : elements) {
if(element.getAttribute("contentDescription").equals("plus")) {
element.click();
break;
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As demonstrated, inspecting a desired element from the target Android App under test is easy enough using UIAutomatorViewer in Appium. This can be used to test the functionality of UI elements while performing &lt;a href="https://www.browserstack.com/guide/android-app-automation-testing-tools" rel="noopener noreferrer"&gt;Android App Automation testing&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>ux</category>
      <category>tutorial</category>
      <category>uiweekly</category>
    </item>
    <item>
      <title>How to handle Web Tables in Selenium</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Wed, 23 Mar 2022 10:45:27 +0000</pubDate>
      <link>https://dev.to/garima_writes/how-to-handle-web-tables-in-selenium-2380</link>
      <guid>https://dev.to/garima_writes/how-to-handle-web-tables-in-selenium-2380</guid>
      <description>&lt;p&gt;Selenium is a widely used &lt;a href="https://www.browserstack.com/guide/automation-testing-tutorial" rel="noopener noreferrer"&gt;automation testing tool&lt;/a&gt; used to ensure that websites work as expected, in line with predetermined technical and business requirements. Using &lt;a href="https://www.browserstack.com/selenium" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; helps website developers comply with the growing demands made upon them i.e. faster release of updated and perfectly functioning features, ideally within every few weeks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/guide/selenium-webdriver-tutorial" rel="noopener noreferrer"&gt;Selenium Webdriver&lt;/a&gt;, a major component of the Selenium Test Suite is a web framework that runs automated tests on websites to ensure all UI elements are functioning accurately.&lt;/p&gt;

&lt;p&gt;Among essential UI elements, web tables are important for sites in which information has to be depicted in a tabular format. These tables could have static data that is fed once or could comprise dynamic data that automatically changes at regular intervals.&lt;/p&gt;

&lt;p&gt;The data in the tables is often useful for the overall functionality of the web application. This makes it an important feature, which needs to be tested for accurate functioning using Selenium.&lt;/p&gt;

&lt;p&gt;This article will demonstrate the testing of web tables using Selenium Webdriver through an example. However, let’s begin with understanding the types of web tables, and how they work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Web Tables?
&lt;/h2&gt;

&lt;p&gt;Web Tables are like normal tables where the data is presented in a structured form using rows and columns. The only difference is that they are displayed on the web with the help of HTML code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; is the HTML tag that is used to define a web table. While &lt;code&gt;&amp;lt;th&amp;gt;&lt;/code&gt; is used for defining the header of the table, &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt; tags are used for defining rows and columns respectively for the web table.&lt;/p&gt;

&lt;p&gt;Example of writing a web table using HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;table&amp;gt;
 &amp;lt;tr&amp;gt;
  &amp;lt;th&amp;gt;First Name&amp;lt;/th&amp;gt;
  &amp;lt;th&amp;gt;Last Name&amp;lt;/th&amp;gt;
  &amp;lt;th&amp;gt;Age&amp;lt;/th&amp;gt;
 &amp;lt;/tr&amp;gt;
 &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Jill&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Ann&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt;
 &amp;lt;/tr&amp;gt;
 &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Eve&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Anderson&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;34&amp;lt;/td&amp;gt;
 &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; The image shown below depicts how the web table written using code snippet above looks like.&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%2Fp7e0uu1v44a88ycopbb4.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%2Fp7e0uu1v44a88ycopbb4.png" alt="Web Tables Example" width="287" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Web Tables
&lt;/h2&gt;

&lt;p&gt;Depending on the data in the table, web tables can be classified as Static web tables and Dynamic web tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Static Web Tables
&lt;/h3&gt;

&lt;p&gt;These tables have fixed data that remains unchanged throughout. Due to the static nature of their content, they are called Static web tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Dynamic Web Tables
&lt;/h3&gt;

&lt;p&gt;These tables have data that changes over time, and hence the number of rows and columns might also change depending upon the data shifts. Due to the dynamic nature of their content, they are called Dynamic web tables.&lt;/p&gt;

&lt;p&gt;Often, the functionalities of web applications depend on the data carried by Dynamic web tables, as they act as the data source for the functional modules in many cases. Thus, handling dynamic web tables using Selenium WebDriver is essential for QAs to run test cases that determine website performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to handle web tables in Selenium?
&lt;/h2&gt;

&lt;p&gt;Let’s understand the handling of web tables with the help of an example. The example uses the data presented using web tables on the IPO Filings Data section of the NYSE (New York Stock Exchange) website to demonstrate the process.&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%2Fnafddaviwp7dibl3l459.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%2Fnafddaviwp7dibl3l459.png" alt="Dynamic Web Table on the IPO Filings Data page of NYSE" width="512" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding XPath Selected Element in Dynamic Web Table
&lt;/h2&gt;

&lt;p&gt;Let’s select an element in the web table and find its XPath. For Chrome, right-click and inspect the given element to find its XPath.&lt;/p&gt;

&lt;p&gt;To find the XPath of a UI element in Firefox, right-click on the desired element, go to “Inspect Element” to open the inspector which will help identify its &lt;a href="https://www.browserstack.com/guide/xpath-in-selenium" rel="noopener noreferrer"&gt;XPath&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%2Fpcq7xpgc9kqj7b9t24yw.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%2Fpcq7xpgc9kqj7b9t24yw.png" alt="Finding XPath of selected element using Inspect Element for Google Chrome" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding the number of rows and columns of Dynamic Web Table in Selenium
&lt;/h2&gt;

&lt;p&gt;Here’s the code snippet to find the total number of rows and columns for the above Dynamic Web Table&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Finding number of Rows
List&amp;lt;WebElement&amp;gt; rowsNumber = driver.findElements(By.xpath(“//*[@id="content-8b4988b9-2ec9-4e77-9b4d-9c2994bd9e8a"]/div/div/table[1]/tbody/tr[1]/td[1]”));
int rowCount = rowsNumber.size();
System.out.println("No of rows in this table : " + rowCount);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; No of rows in this table: 8&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Finding number of Columns
List&amp;lt;WebElement&amp;gt; columnsNumber = driver.findElements(By.xpath("//*[@id="content-8b4988b9-2ec9-4e77-9b4d-9c2994bd9e8a"]/div/div/table[1]/thead/tr/th[1]"));

int columnCount = columnsNumber.size();
System.out.println("No of columns in this table : " + columnCount);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; No of columns in this table: 9&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding cell value for specific row &amp;amp; column of Dynamic Web Table in Selenium
&lt;/h2&gt;

&lt;p&gt;Let’s identify the data present in the 6th Row and 6th Column of the given dynamic web table on the IPO Filings Data page of the NYSE website:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WebElement cellAddress = Rowtable.findElement(By.xpath(“//*[@id="content-8b4988b9-2ec9-4e77-9b4d-9c2994bd9e8a"]/div/div/table[1]/tbody/tr[4]/td[3]”));
String value = cellAddress.getText();
System.out.println(“The Cell Value is : “ +value);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; The Cell Value is: OLMA&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete Code for handling web tables in Selenium
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Identify the number of rows &amp;amp; columns and fetching the cell value for given row and column from the IPO Filing Data web table on the NYSE website using Selenium&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Opening Chrome Browser
package browser;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class BrowserSelection
{
static WebDriver driver;

public static WebDriver usingChrome()
{
System.setProperty("webdriver.chrome.driver", "E:\SeleniumLibs\\chromedriver_win32\chromedriver.exe");
driver = new ChromeDriver();
driver.manage().window().maximize();
return driver;
}
}

//Test to handle dynamic web table using Selenium WebDriver

package dynamicwebtable;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import browser.BrowserSelection;

public class DynamicWebTableTest
{
WebDriver driver;

@BeforeMethod
public void openBrowser()
{

driver = BrowserSelection.usingChrome();
}

@Test
public void tripDetails() throws InterruptedException, AWTException
{

//Modify Wait time as per the Network Ability in the Thread Sleep method

driver.get("https://www.nyse.com/ipo-center/filings");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Thread.sleep(5000);

//Finding number of Rows

List&amp;lt;WebElement&amp;gt; rowsNumber = driver.findElements(By.xpath("//*[@id="content-8b4988b9-2ec9-4e77-9b4d-9c2994bd9e8a"]/div/div/table[1]/tbody/tr[1]/td[1]"));
int rowCount = rowsNumber.size();
System.out.println("No of rows in this table : " + rowCount);

//Finding number of Columns

List&amp;lt;WebElement&amp;gt; columnsNumber = driver.findElements(By.xpath("//*[@id="content-8b4988b9-2ec9-4e77-9b4d-9c2994bd9e8a"]/div/div/table[1]/thead/tr/th[1]"));
int columnCount = columnsNumber.size();
System.out.println("No of columns in this table : " + columnCount);

//Finding cell value at 4th row and 3rd column

WebElement cellAddress = Rowtable.findElement(By.xpath(“//*[@id="content-8b4988b9-2ec9-4e77-9b4d-9c2994bd9e8a"]/div/div/table[1]/tbody/tr[4]/td[3]”));
String value = cellAddress.getText();
System.out.println(“The Cell Value is : “ +value);

driver.quit();
}

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

&lt;/div&gt;



&lt;p&gt;As demonstrated, handling the dynamic web table on a website is easy enough using Selenium. Run the code, evaluate the results, and start applying the same process to websites with this particular functionality.&lt;/p&gt;

&lt;p&gt;To get accurate results and for identifying all the bottlenecks, it is recommended to run Selenium tests on real browsers and devices to ensure testing in &lt;a href="https://www.browserstack.com/real-user-conditions-testing-on-browserstack" rel="noopener noreferrer"&gt;real user conditions&lt;/a&gt;. Thus, running on &lt;a href="https://www.browserstack.com/cloud-selenium-grid" rel="noopener noreferrer"&gt;cloud Selenium Grid&lt;/a&gt; is a great way to achieve best results.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>webdev</category>
      <category>webcomponents</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to test Gaming Apps</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Thu, 17 Mar 2022 11:44:55 +0000</pubDate>
      <link>https://dev.to/garima_writes/how-to-test-gaming-apps-587n</link>
      <guid>https://dev.to/garima_writes/how-to-test-gaming-apps-587n</guid>
      <description>&lt;p&gt;With popular gaming consoles like PlayStation, Xbox, Nintendo Switch, along with millions of gaming Apps available on the Play Store and App Store, the &lt;a href="http://mordorintelligence.com/industry-reports/global-gaming-market" rel="noopener noreferrer"&gt;Global Gaming market&lt;/a&gt; is massive, valued at USD 173.70 Billion as of 2020 and projected to reach USD 314.40 Billion by 2026, with a CAGR of 9.64%. Given the market size and the projected growth estimates, gaming apps have immense business potential, and thus, need to be of high quality to capture the market. &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%2Fb7g4fkm950p6dqthmhtr.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%2Fb7g4fkm950p6dqthmhtr.png" alt="Projection of Gaming Market" width="512" height="355"&gt;&lt;/a&gt;&lt;br&gt;
Source: &lt;a href="https://mordorintelligence.com/industry-reports/global-gaming-market" rel="noopener noreferrer"&gt;Mordor Intelligence&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;The &lt;a href="https://newzoo.com/insights/articles/games-market-engagement-revenues-trends-2020-2023-gaming-report/" rel="noopener noreferrer"&gt;Gaming industry is massive&lt;/a&gt; and shows no signs of slowing down as the number of global players is steadily increasing at the rate of 5.6% CAGR. As of 2020, there were over 2.5 Billion Mobile Game Players, 1.3 Billion PC Game Players, and 0.8 Billion Console Game Players globally.&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%2F9wwknn7cun9jepqpsijf.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%2F9wwknn7cun9jepqpsijf.png" alt="2015-2023 Gaming Market" width="512" height="288"&gt;&lt;/a&gt;&lt;br&gt;
Source: &lt;a href="https://newzoo.com/insights/articles/games-market-engagement-revenues-trends-2020-2023-gaming-report/" rel="noopener noreferrer"&gt;Newzoo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While there is a constant growth projected in the gaming market globally, Asia Pacific marks the biggest market of the Gaming Industry with over 1.4 Billion game players. On the other hand, the Middle East and Africa are the emerging markets with the highest projected growth of 8.8% YoY.&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%2F6iyqwys0jlsu1x1ngjkn.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%2F6iyqwys0jlsu1x1ngjkn.png" alt="Gaming Market Growth Distribution Region-wise" width="512" height="288"&gt;&lt;/a&gt;&lt;br&gt;
Source: &lt;a href="https://newzoo.com/insights/articles/games-market-engagement-revenues-trends-2020-2023-gaming-report/" rel="noopener noreferrer"&gt;Newzoo&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Gaming apps are ubiquitous across different platforms such as gaming consoles, personal computers, mobile devices, and tabs. To succeed, these apps must offer &lt;a href="https://www.browserstack.com/blog/cross-browser-testing-for-compatibility/" rel="noopener noreferrer"&gt;cross platform compatibility&lt;/a&gt; for a seamless experience across different platforms.&lt;/p&gt;

&lt;p&gt;Testing gaming software is essential to ensure that, among other things, a high-quality gaming app can be accessed on multiple platforms to offer rich customer engagement.&lt;/p&gt;

&lt;p&gt;This article will discuss how to test gaming apps extensively, cover a wider area of essential features, rich user experience, and verify cross platform compatibility to meet user expectations. &lt;/p&gt;

&lt;h2&gt;
  
  
  What to test on Gaming Apps
&lt;/h2&gt;

&lt;p&gt;A gaming experience is all about the graphics, sound, and concept of the game meant to hook the gamer. User experience is the central entity in a gaming app, around which the development process takes place. Whether it is graphics, background music, function, or cross platform compatibility, every aspect works around to provide a complete gaming experience. In a typical gaming application, the following are the main features that have to be tested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User Login&lt;/strong&gt;&lt;br&gt;
Games require players to login and maintain individual scoreboards, especially when playing in multiplayer mode. Hence, user login and user profile information pages should properly function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Payment Gateway&lt;/strong&gt;&lt;br&gt;
In case the game has some paid features, it is important to have a proper payment gateway page setup that is secure and seamless. Hassle-free payment, along with the data security of the payment details are a must for setting up a functional payment gateway. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other scenarios that should be tested include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;payment cancellation&lt;/li&gt;
&lt;li&gt;payment acknowledgment and receipt generation&lt;/li&gt;
&lt;li&gt;payment method validations (whether using Credit/Debit Card or Internet Banking)&lt;/li&gt;
&lt;li&gt;currency calculation in case of dealing with multiple currencies&lt;/li&gt;
&lt;li&gt;integration with third-party payment gateway systems such as Razorpay&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since payment is one of the most sensitive functions of a gaming app, QAs must perform comprehensive testing of various scenarios for optimal performance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiplayer and Single-player Modes&lt;/strong&gt;&lt;br&gt;
The game should be easy to switch from Single player to Multiplayer mode. Moreover, different players playing together from different devices should be able to connect seamlessly and enjoy a consistent user experience throughout. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Levels of Game&lt;/strong&gt;&lt;br&gt;
Ascending levels of a game with successful completion of each level is one of the primary functions required in a gaming app. Testing level selection and ascension to the next level are key scenarios a QA must check while testing a gaming app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Graphics and Sound Effects&lt;/strong&gt;&lt;br&gt;
The graphics and sound effects make a gaming experience fulfilling and interesting. Having rich graphics and sound effects across all devices is a key concern that a QA must test, in order to prevent disruptive and inconsistent experiences. Hence, it is important that the gaming app has a &lt;a href="https://www.browserstack.com/responsive-design" rel="noopener noreferrer"&gt;responsive design&lt;/a&gt; that can adjust to different devices.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Testing to perform on Gaming Apps
&lt;/h2&gt;

&lt;p&gt;In Gaming Apps, UI/UX plays a major role in retaining enthusiasts. Hence different tests are essential for an enriched gaming experience. &lt;/p&gt;

&lt;p&gt;Tests such as Functional Testing, Regression Testing, Responsive Testing, Performance Testing, UX testing, &lt;a href="https://www.browserstack.com/live" rel="noopener noreferrer"&gt;Cross Browser Compatibility Testing&lt;/a&gt;, and Website Speed Tests are essential in this regard.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Functional Testing
&lt;/h3&gt;

&lt;p&gt;Functional Testing checks whether the gaming app is working as per the predetermined requirements. This means all functions such as Player Login, Game Algorithm, Scorecard, etc. are working as expected. The test cases are designed on the basis of different possible scenarios, which test various functions from the most basic to advanced ones. &lt;/p&gt;

&lt;p&gt;Unit Tests, Sanity Tests, Smoke Tests, Regression Tests, Integration Tests, and Usability tests are some of the testing methods that are used as sub-categories of Functional Testing. While Functional Testing is primary and essential for quality assurance of gaming apps, it is highly time-consuming when performed manually. Hence, an efficient alternative is automation testing, where tools such as Appium can be used to test gaming apps, saving time and effort. &lt;/p&gt;

&lt;p&gt;Testing Gaming Apps on &lt;a href="https://www.browserstack.com/real-device-cloud" rel="noopener noreferrer"&gt;real device cloud&lt;/a&gt; enables QAs to run automated tests on real browsers and devices, providing wider coverage for testing. Testers can build test cases for gaming apps pertaining to real user conditions to avoid any disruptions causing an unpleasant user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Cross Platform Compatibility Testing
&lt;/h3&gt;

&lt;p&gt;Gaming apps should be accessed by players from different devices and platforms, especially in multiplayer mode, where multiple gamers simultaneously play the game. Despite accessing the app from different platforms, the users expect a seamless gaming experience; hence the gaming app has to be cross platform compatible.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Website Speed Testing
&lt;/h3&gt;

&lt;p&gt;Bear in mind that there are certain online games that can be played in browsers. These games must load as fast as possible for a continuous and streamlined gaming experience, irrespective of the device-browser combination they are accessed from.&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%2F8hjbymb4s1fk07o9shb7.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%2F8hjbymb4s1fk07o9shb7.png" alt="Speed Test of 2048 Game" width="512" height="322"&gt;&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%2Ffd6gyrv5qegtrw5lrg2t.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%2Ffd6gyrv5qegtrw5lrg2t.png" alt="Speed Test Result of 2048 Game" width="512" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  - Performance Testing
&lt;/h3&gt;

&lt;p&gt;Checking the performance of gaming apps on various parameters such as stability, scalability, speed, and responsiveness altogether, under real user conditions, for varying levels of traffic and load is important to build a robust gaming app. BrowserStack’s real device cloud allows QAs to execute &lt;a href="https://www.browserstack.com/guide/performance-testing" rel="noopener noreferrer"&gt;performance testing&lt;/a&gt; on real devices, browsers, and platforms to ensure optimal performance through rigorous testing.&lt;/p&gt;

&lt;p&gt;Testing of gaming apps is necessary to offer an unmatched gaming experience. However, tests must be comprehensive and test scenarios have to be designed to offer maximum coverage.&lt;/p&gt;

&lt;p&gt;This article covers general testing scenarios and testing types that should be performed by the QAs. It can be used as a foundation for extensive testing of gaming apps. Further detailed test scenarios can be created as per business requirements to ensure a high-quality gaming app offering a rich user experience.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Why is it important to test Gaming Apps on multiple devices?
&lt;/h2&gt;

&lt;p&gt;With a massive target audience, it is important that the gaming apps are versatile and can offer the same gaming experience on multiple devices to delight the larger user base. Since users have the option to use different devices and switch between them, it is essential that the gaming apps perform consistently on each so that the user can play games on the go.&lt;/p&gt;

&lt;p&gt;A seamless gaming experience would mean that despite the different browser-device-platform combinations, the game offers the same experience throughout. This can only be achieved through comprehensive cross-platform testing using real devices. &lt;/p&gt;

&lt;h2&gt;
  
  
  Cross Browser Testing a Real Gaming App
&lt;/h2&gt;

&lt;p&gt;To showcase how testing works, let us test a real Gaming App, 2048 on URL &lt;a href="https://play2048.co/" rel="noopener noreferrer"&gt;https://play2048.co/&lt;/a&gt; using BrowserStack Live. &lt;/p&gt;

&lt;p&gt;Step1 Enter the website URL of the 2048 Game under test upon opening BrowserStack Live.&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%2Fmxjuiz92uv12udqqcmd7.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%2Fmxjuiz92uv12udqqcmd7.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step2 Select the Device-Browser Combination for 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%2Fag1s3n4edwvha9i5yj1y.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%2Fag1s3n4edwvha9i5yj1y.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are some tests conducted on different Browser-Device-Platform Combinations for the Game 2048:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;On iPad Pro 12.9 2018 v13.5 on Safari&lt;br&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%2Frjs0vme9j5xm05i9o7m4.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%2Frjs0vme9j5xm05i9o7m4.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;iPhone 11 Pro Max v13.4 on Safari&lt;br&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%2F2g4mvkyk9dwuhnrt6zcl.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%2F2g4mvkyk9dwuhnrt6zcl.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OnePlus 6T on Safari&lt;br&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%2Fccz0wem95upgvb2qpllb.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%2Fccz0wem95upgvb2qpllb.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Samsung Galaxy A10 v9.0 on Firefox&lt;br&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%2Friymwdnbimntb6yxdhqz.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%2Friymwdnbimntb6yxdhqz.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Windows10 on Google Chrome&lt;br&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%2F8d5xsocgzpop8ftt8qrk.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%2F8d5xsocgzpop8ftt8qrk.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MacOS Big Sur on Opera&lt;br&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%2Fr3nf8m38kpe037odql3o.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%2Fr3nf8m38kpe037odql3o.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Test Result: &lt;/p&gt;

&lt;p&gt;On all of the devices, the game worked consistently providing the same gaming experience. Hence, it can be concluded that the &lt;strong&gt;game 2048 is cross-browser compatible&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing a Real Gaming Mobile App
&lt;/h2&gt;

&lt;p&gt;To showcase how to test mobile gaming apps on real mobile devices, let us test the same game as above – 2048 on Samsung Galaxy S9 v8.0 by downloading the game app from Google Play Store and testing it using &lt;a href="https://www.browserstack.com/app-live" rel="noopener noreferrer"&gt;BrowserStack App Live&lt;/a&gt;. In this case, the actual app is being testing as opposed to the 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%2Fy3eezgp2i8xz82bqb246.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%2Fy3eezgp2i8xz82bqb246.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Downloading the 2048 app on the Real Cloud Device: Samsung Galaxy S9 v8.0 from the Google Playstore.&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%2Fepn3sbnbecc2n7f3qk0i.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%2Fepn3sbnbecc2n7f3qk0i.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Testing the 2048 Game App on Samsung Galaxy S9 v8.0&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%2F0925wonz9jjtxxfv6vaf.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%2F0925wonz9jjtxxfv6vaf.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Result:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The 2048 game application worked exactly the same and provided a consistent gaming experience as it did with the web app on various devices. Hence, it can be concluded that the game 2048 is cross-platform compatible. &lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices while Testing a Gaming App
&lt;/h2&gt;

&lt;p&gt;Here are some of the best practices to be followed while testing a Gaming App:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Test Cross Browser Functionality: UI/UX plays a major role in the gaming experience and hence it is essential that the gaming experience remains unaltered as the user switches between browsers. Hence cross browser compatibility is mandatory and should be a priority while testing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test on Real Devices: QAs must use real devices instead of emulators and simulators to understand how an app would perform in the world. This would allow them to report issues accordingly for a smooth gaming experience. While testing on real devices might seem costly, using BrowserStack’s real device cloud, it is possible to test on thousands of device-browser combinations in a cost-effective way. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take Screenshots or record video of tests: Screenshots and Video Recordings help with debugging when a test case fails or displays unexpected behavior. They help identify exactly where in the test script anomalies appeared and caused the test to fail.BrowserStcak’s comprehensive debugging tools allow QAs to take screenshots and record videos of tests for easy bug identification and resolution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Testing gaming apps are essential for a seamless and engaging gaming experience. While testing the functionality of the gaming apps is important, it is also necessary to ensure cross browser compatibility of the game for a consistent user experience. To demonstrate the cross platform compatibility, the 2048 web and mobile Gaming apps were tested on BrowserStack Live and BrowserStack App Live using Real Device Cloud. As a result, the popular game proved to be consistent in its user experience across all the platforms, devices, and browsers.  &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>gamedev</category>
      <category>testing</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Protractor Testing Tutorial: Test Automation with Protractor and Selenium</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Fri, 04 Mar 2022 14:03:56 +0000</pubDate>
      <link>https://dev.to/garima_writes/protractor-testing-tutorial-test-automation-with-protractor-and-selenium-33mf</link>
      <guid>https://dev.to/garima_writes/protractor-testing-tutorial-test-automation-with-protractor-and-selenium-33mf</guid>
      <description>&lt;p&gt;The growing demand for high-end software on both web and mobile platforms has made businesses seek advanced development and testing methodologies to deliver excellence. Since software applications are made on different platforms using different tech stacks like AngularJS, NodeJS, etc., the test automation suite has to be compatible with them to offer wide coverage. Frameworks like Protractor help in this regard, facilitating end to end testing due to their compatibility with Selenium Webdriver.&lt;/p&gt;

&lt;p&gt;When conducted in tandem with Protractor, one can increase the scope of Selenium tests from only web platforms to the Web applications built using AngularJS as well.&lt;/p&gt;

&lt;p&gt;Protractor offers third-party integrations that make testing and debugging more efficient through greater test coverage. It’s easy to write scripts and run them on a robust architecture based on RESTful services, making it a good choice to perform automation testing on AngularJS.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Protractor?
&lt;/h2&gt;

&lt;p&gt;Protractor is an open-source automation testing framework that is written using NodeJS. It offers combined &lt;a href="https://www.browserstack.com/guide/end-to-end-testing" rel="noopener noreferrer"&gt;end to end testing&lt;/a&gt; for web applications that are built using AngularJS. It supports both Angular and Non-Angular applications. But because it can be used to test advanced HTML attributes, Protractor is widely preferred for testing AngularJS.&lt;/p&gt;

&lt;p&gt;It leverages the power of various technologies such as NodeJS, Selenium Webdriver, Jasmine, Mocha, Cucumber, etc. to offer a strong automation test suite that is capable of performing Cross Browser Testing for web applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Protractor Architecture: How does it work?
&lt;/h2&gt;

&lt;p&gt;Protractor is a wrapper around Selenium Webdriver that provides an automation test framework, which simulates user interaction with an Angular web application for a range of browsers and mobile devices.&lt;/p&gt;

&lt;p&gt;It provides all features of Selenium WebDriver along with Angular specific features for seamless end to end testing. Protractor uses JSON Wire protocol similar to that of Selenium WebDriver to allow user interaction with the browser.&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%2Fg1tet3e06dxljqh6qrst.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%2Fg1tet3e06dxljqh6qrst.png" alt="Protractor Architecture" width="783" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The whole process comprises three elements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test Script&lt;/li&gt;
&lt;li&gt;Server&lt;/li&gt;
&lt;li&gt;Browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Test Script interacts with the browser with the help of the Selenium server, where the commands from the test script are forwarded to one or more browsers (in case of parallel execution using Selenium Grid). &lt;/p&gt;

&lt;h2&gt;
  
  
  Why use Protractor for Automation Testing?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Identifies Web Elements with advanced HTML attributes
&lt;/h3&gt;

&lt;p&gt;For various Angular-based web applications, the web elements using the advanced HTML attributes like ng-controller, ng-repeater, ng-model, etc. cannot be easily tested, hindering the overall functional testing. These HTML attributes cannot be gauged by Selenium as they are not present in the &lt;a href="https://www.browserstack.com/guide/locators-in-selenium" rel="noopener noreferrer"&gt;Selenium Locators&lt;/a&gt;. Protractor helps in identifying and testing web elements using these attributes. This is why Protractor is used as a wrapper over Selenium WebDriver for automated end to end Testing of Angular-based web applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Performs End to End Functional Testing
&lt;/h3&gt;

&lt;p&gt;While other testing frameworks offer unit testing for Angular web apps, Protractor allows the tester to perform automated functional testing on Angular web apps using Selenium WebDriver. It allows testing of all layers of the application, which ensures high-quality software that is functionally robust.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Performs Cross Browser Testing
&lt;/h3&gt;

&lt;p&gt;Protractor simulates user interactions by automating browsers such as Chrome, Firefox, Edge, IE, Safari, Opera, and Yandex. It does so with the help of the Browser Drivers for Selenium WebDriver like &lt;a href="https://www.browserstack.com/guide/run-selenium-tests-using-selenium-chromedriver" rel="noopener noreferrer"&gt;ChromeDriver&lt;/a&gt;, &lt;a href="https://www.browserstack.com/guide/geckodriver-vs-marionette" rel="noopener noreferrer"&gt;GeckoDriver&lt;/a&gt;, &lt;a href="https://www.browserstack.com/guide/run-selenium-tests-on-safari-using-safaridriver" rel="noopener noreferrer"&gt;SafariDriver&lt;/a&gt;, etc. This allows wider coverage for Cross Browser Testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Supports Real Devices on Cloud for a wider coverage
&lt;/h3&gt;

&lt;p&gt;When performing tests on a remote server, Protractor can be used to test Cross Browser Compatibility for a wide range of devices using a Real Device Cloud. BrowserStack’s real device cloud provides access to a fleet of 3000+ desktop browsers and real mobile devices like iPhone, iPad, Galaxy, OnePlus, Pixel, Xiaomi, and Redmi, to name a few.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Offers Flexibility by supporting different languages for API bindings
&lt;/h3&gt;

&lt;p&gt;Protractor is compatible with WebDriver API bindings written in different languages such as JavaScript, Java, Python, Ruby, etc., thereby offering flexibility.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Supports Asynchronous Test Execution
&lt;/h3&gt;

&lt;p&gt;Protractor supports asynchronous execution, using Callbacks, Promises, and Async/Await to improve performance and make it faster. Thus, comprehensive End to End Testing can be performed on the Angular web apps in a short span of time.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Allows Automatic Waiting
&lt;/h3&gt;

&lt;p&gt;Protractor offers testers the feature of Automatic Waiting, where they don’t have to add wait(s) and sleep(s) in the code. It can automatically execute the next step in the test, as soon as the webpage completes the ongoing pending tasks. Thus, waiting for the test and webpage to sync is not required when using Protractor.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to set up Protractor for Test Automation?
&lt;/h2&gt;

&lt;p&gt;Before exploring how to use Protractor and Selenium WebDriver for automation testing, let’s understand how to set up Protractor. In order to do so, follow the steps mentioned below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nodejs.org/en/download/" rel="noopener noreferrer"&gt;Install NodeJS&lt;/a&gt;: To check if the NodeJS and npm are correctly installed, enter the following commands:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ node -v&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ npm -v&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install Protractor globally using npm, by entering the following command:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;npm install -g protractor&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will install protractor (Protractor API) and a default Selenium Server webdriver-manager, which means there is no need to start a standalone server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To check if Protractor is installed properly and know its version, enter the following command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;protractor --version&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update the WebDriver Manager by entering the following command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;webdriver-manager update&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start the WebDriver Manager by entering the following command. This would run WebdriverManager in the background and would identify the tests and run them using Protractor. As Protractor is used, the web driver automatically sends the tests to the relevant browsers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;webdriver-manager start&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to write a test using Protractor Framework?
&lt;/h2&gt;

&lt;p&gt;Once the Protractor is set up, in order to perform the test, one needs a spec file and a configuration file. While the spec file is the actual test script, the configuration file specifies the details of the test such as where to find the test files, which browser and framework are to be used for running them along with other configurations. However, if the configuration is not defined in the configuration file, Protractor uses the defaults.&lt;/p&gt;

&lt;p&gt;Here’s the scenario to be automated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launch Google.com on the browser&lt;/li&gt;
&lt;li&gt;Enter the search query “BrowserStack” in the search box&lt;/li&gt;
&lt;li&gt;Check whether the title of the resulting page is “BrowserStack – Google Search”&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Specs file for the Test
&lt;/h2&gt;

&lt;p&gt;Specs file for this test scenario is saved as ProtractorTestScript.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;describe('Google\'s Search Functionality', function() {
it('can find search results', function() {

browser.driver.get('https://google.com/');
element(by.name('q')).sendKeys('BrowserStack');
element(by.name('btnG')).click();

//title of the launched webpage is expected to be BrowserStack - Google Search

expect(browser.getTitle()).toEqual('BrowserStack - Google Search');
});
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Config file for the Test
&lt;/h2&gt;

&lt;p&gt;Specs file for this test scenario is saved as conf.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exports.config = {
framework: 'jasmine',
capabilities: {
browserName: 'chrome',
},
specs: ['ProtractorTestScript.js']
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above test will be run in Chrome browser using Jasmine framework, while the local host address remains default (when using remote server, this needs to be specified).&lt;/p&gt;

&lt;h2&gt;
  
  
  Executing Cross Browser Parallel Testing using Protractor
&lt;/h2&gt;

&lt;p&gt;To run the same test script parallelly on two different browsers i.e. Chrome and Firefox, here is the code for the config file &lt;strong&gt;conf.js&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;exports.config = {
framework: 'jasmine',
specs: ['ProtractorTestScript.js']
multiCapabilities: [{
browserName: 'chrome',
},
{
browserName: 'firefox',
}],
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above feature makes Protractor a great choice for performing automated Cross Browser Testing since it saves time and resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the Test Script
&lt;/h2&gt;

&lt;p&gt;Once the test script is ready, it can be executed by running the following command on the Command Prompt:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;protractor conf.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Upon entering the command above, the Selenium Server will automatically run the test script, for which the following steps occur:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google.com will be launched (&lt;a href="https://google.com/" rel="noopener noreferrer"&gt;https://google.com/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;BrowserStack is put in the search field and entered&lt;/li&gt;
&lt;li&gt;Title of the webpage opened as the search result is fetched and given as output in the console.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Practices in Protractor Testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use &lt;a href="https://www.browserstack.com/guide/parallel-testing-with-selenium" rel="noopener noreferrer"&gt;Parallel Testing&lt;/a&gt; for Cross Browser Testing on different browsers to save time, resources and ensure Cross Browser Compatibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For keeping track of the action performed with each of commands and make debugging easier, use Text and Visual Logs. While Text Logs fulfil the purpose of record keeping, Visual logs create screenshots of each test step, which helps understand application behavior and troubleshoot when the expected outcome is not achieved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The user can also record test execution in video format to monitor what fails and understand why it failed. This enables precise debugging. Keep in mind that this might also lengthen execution time, hence use it only where the expected outcome is not achieved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tests that pass don’t need to be strictly monitored since an increase in run time could slow down operations if a large number of tests have to be executed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As always, it is important to run the Protractor Selenium tests on real browsers and devices.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Test automation is crucial for testers to keep up with the growing demands of faster delivery and optimal software quality. Running automated tests via Protractor and Selenium allows testers to achieve precisely this for Angular web applications, resulting in the creation of better applications in shorter durations with Parallel Execution.&lt;/p&gt;

&lt;p&gt;However, Protractor automation works best when testing websites on a real device cloud. Doing so is the only way to ensure complete accuracy of results. So, always opt for real device testing to comprehensively verify website performance, &lt;a href="https://www.browserstack.com/guide/cross-browser-compatibility-testing-beyond-chrome" rel="noopener noreferrer"&gt;cross browser compatibility&lt;/a&gt;, and the quality of user experience it offers.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>angular</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to set Proxy in Firefox using Selenium WebDriver?</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Mon, 21 Feb 2022 12:10:30 +0000</pubDate>
      <link>https://dev.to/garima_writes/how-to-set-proxy-in-firefox-using-selenium-webdriver-18jj</link>
      <guid>https://dev.to/garima_writes/how-to-set-proxy-in-firefox-using-selenium-webdriver-18jj</guid>
      <description>&lt;p&gt;Internet bandwidth is an important asset, especially at workplaces where multiple resources use the same network simultaneously. High-speed internet enables work to be completely faster and more efficiently. This is particularly true when working with web applications, where the internet is actively used.&lt;/p&gt;

&lt;p&gt;Setting up Proxy Servers makes the system faster by compressing traffic, managing cache data, and frequently visited web pages. This enhances internet speed and decreases page load speed significantly.&lt;/p&gt;

&lt;p&gt;The proxy server is an entity between the client and the server. Whenever placing requests, the entire traffic from the server flows to the client via the proxy server. Setting up the proxy server while testing a web application on &lt;a href="https://www.browserstack.com/guide/selenium-webdriver-tutorial" rel="noopener noreferrer"&gt;Selenium WebDriver&lt;/a&gt; could be helpful in capturing traffic.&lt;/p&gt;

&lt;p&gt;Proxy servers let the user access the URL of the &lt;a href="https://www.browserstack.com/web-application-testing-on-cloud" rel="noopener noreferrer"&gt;web application for testing&lt;/a&gt;, despite the complex topologies of the network. This network at the workplace complies with the strict policies and thus has many restrictions that hinders testing web applications on it.&lt;/p&gt;

&lt;p&gt;This could also mock the backend request calls made by the web application under test, which could be useful in the testing process.&lt;/p&gt;

&lt;p&gt;While running a &lt;a href="https://www.browserstack.com/selenium" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; test, it is essential to set the proxy settings of the browser, since the WebDriver launches the browser all over again, every time a test is run. However, each time the browser is launched, the proxy settings reset automatically and need to be reset every time.&lt;/p&gt;

&lt;p&gt;This article discusses the various methods by which to manage proxy settings in Selenium WebDriver.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Firefox Proxy using Selenium
&lt;/h2&gt;

&lt;p&gt;There are three ways of setting up Firefox Proxy using Selenium:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;By adding preferred Proxy Server Host and Port details to FirefoxOptions class, that can be later used in the tests.&lt;/li&gt;
&lt;li&gt;By setting Firefox Profile using FirefoxProfile class.&lt;/li&gt;
&lt;li&gt;By setting up desired capabilities.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. Using FirefoxOptions Class
&lt;/h3&gt;

&lt;p&gt;The following code sets up Proxy by using Class FirefoxOptions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;

public class proxyTest {
public static void main(String[] args) {

Proxy proxy = new Proxy();
//Adding the desired host and port for the http, ssl, and ftp Proxy Servers respectively
proxy.setHttpProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setSslProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setSslProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setFtpProxy("&amp;lt;HOST:PORT&amp;gt;");
FirefoxOptions options = new FirefoxOptions();
options.setCapability("proxy", proxy);
//Calling new Firefox profile for test
WebDriver driver = new FirefoxDriver(options);
driver.get("https://www.browserstack.com/");
driver.manage().window().maximize();
driver.quit();
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Using FirefoxProfile Class
&lt;/h3&gt;

&lt;p&gt;Similar to the previous method, one can also set Firefox Proxy in Selenium using FirefoxProfile Class. Use the code below to do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

public class proxyTest {
public static void main(String[] args) {


Proxy proxy = new Proxy();
//Adding the desired host and port for the http, ssl, and ftp Proxy Servers respectively 
proxy.setHttpProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setSslProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setSslProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setFtpProxy("&amp;lt;HOST:PORT&amp;gt;");

FirefoxProfile profile = new FirefoxProfile();
profile.setProxyPreferences(proxy);

//Calling new Firefox profile for test
WebDriver driver = new FirefoxDriver(profile);
driver.get("https://www.browserstack.com/");
driver.manage().window().maximize();
driver.quit();
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Using Desired Capabilities
&lt;/h3&gt;

&lt;p&gt;Similarly one can also set Proxy in Firefox using Selenium Webdriver, through its &lt;a href="https://www.browserstack.com/guide/desired-capabilities-in-selenium-webdriver" rel="noopener noreferrer"&gt;desired capabilities&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.io.IOException;
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;

public class proxyTest {
public static void main(String[] args) {

Proxy proxy = new Proxy();
//Adding the desired host and port for the http, ssl, ftp Proxy Servers respectively
proxy.setHttpProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setSslProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setSslProxy("&amp;lt;HOST:PORT&amp;gt;");
proxy.setFtpProxy("&amp;lt;HOST:PORT&amp;gt;");

DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(CapabilityType.PROXY, proxy);

//Calling new Firefox profile for test
WebDriver driver = new FirefoxDriver(dc);
driver.get("https://www.browserstack.com/");
driver.manage().window().maximize();
driver.quit();
}
}

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

&lt;/div&gt;



&lt;p&gt;BrowserStack allows its users to set Desired Capabilities through &lt;a href="https://www.browserstack.com/automate/capabilities" rel="noopener noreferrer"&gt;Capabilities Generator&lt;/a&gt; as shown below.&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%2Fg6m00uemblchtgq5w0ve.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%2Fg6m00uemblchtgq5w0ve.png" alt="Image description" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Way Ahead
&lt;/h2&gt;

&lt;p&gt;Testing websites that are on private networks is always a tough job, and it requires setting up of Proxy Server. However, using BrowserStack Local, private websites can be tested on real browsers and devices by manual and automated testing. The latter is accomplished via a Cloud Selenium Grid. The cloud also provides integrations with popular CI/CD tools such as Jira, Jenkins, TeamCity, Travis CI, and much more. Additionally, there are in-built debugging tools that let testers identify and resolve bugs immediately.&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%2Fmliizw2qiyva9v5zklst.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%2Fmliizw2qiyva9v5zklst.png" alt="Image description" width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By Setting browserstack.local capability to true in the test scripts, you can test localhost websites. Then, put the following code snippet in the test script to &lt;a href="https://www.browserstack.com/docs/live/local-testing/behind-proxies-firewalls-vpns" rel="noopener noreferrer"&gt;set up a proxy, while using BrowserStack Local&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bsLocalArgs.put("proxyHost", "127.0.0.1");
bsLocalArgs.put("proxyPort", "8000");  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One can also perform &lt;a href="https://www.browserstack.com/docs/live/local-testing/behind-proxies-firewalls-vpns" rel="noopener noreferrer"&gt;Local Testing of your websites with Network Restrictions&lt;/a&gt; using BrowserStack Local. &lt;/p&gt;

</description>
      <category>testing</category>
      <category>tutorial</category>
      <category>proxy</category>
      <category>java</category>
    </item>
    <item>
      <title>Selenium with JavaScript : Getting Started with Automation Testing</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Thu, 17 Feb 2022 14:00:45 +0000</pubDate>
      <link>https://dev.to/garima_writes/selenium-with-javascript-getting-started-with-automation-testing-391n</link>
      <guid>https://dev.to/garima_writes/selenium-with-javascript-getting-started-with-automation-testing-391n</guid>
      <description>&lt;p&gt;With the ever-expanding scope of web applications, both in terms of technology and functionality, user expectations have increased manifold. Every few weeks, new features are added to web applications for higher user engagement. In order to test these features and ensure that the UI is working well, automated testing is necessary. For testers across the world, Selenium is the first choice for executing automated tests.&lt;/p&gt;

&lt;p&gt;Selenium is an open source automation testing tool that supports a number of scripting languages like C#, Java, Perl, Ruby, JavaScript, etc. Depending on the application to be tested, one can choose the script accordingly. &lt;/p&gt;

&lt;p&gt;JavaScript is a popular choices when it comes to scripting, as suggested by the &lt;a href="https://insights.stackoverflow.com/survey/2021#section-most-loved-dreaded-and-wanted-programming-scripting-and-markup-languages" rel="noopener noreferrer"&gt;StackOverflow's Annual Survey 2021&lt;/a&gt; that is Loved by 61.51% and Dreaded by 38.49% of the 82,000+ respondents.&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%2Fi9g4jn4eiqh1rplnt8ey.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%2Fi9g4jn4eiqh1rplnt8ey.png" alt="Image description" width="800" height="36"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do developers prefer JavaScript for writing Selenium test scripts?
&lt;/h2&gt;

&lt;p&gt;JavaScript is widely used for developing web applications, as a large fraction of web applications are developed using the MEAN stack (MongoDB, Express.js, AngularJS, and Node.js). &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selenium WebDriver with JavaScript is a favorable combination to perform automated UI testing of applications. &lt;/li&gt;
&lt;li&gt;JavaScript offers efficiency with its well built and structured patterns and functions, making the script more compact.&lt;/li&gt;
&lt;li&gt;It offers security and is well supported by a large community of developers.&lt;/li&gt;
&lt;li&gt;These are open source and free of costs, which helps in decreasing the overall cost of testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is essential to perform an in-depth evaluation of the application under testing before choosing the scripting language for automated testing with &lt;a href="https://www.browserstack.com/guide/selenium-webdriver-tutorial" rel="noopener noreferrer"&gt;Selenium WebDriver&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started with Selenium using JavaScript
&lt;/h2&gt;

&lt;p&gt;Selenium offers great flexibility when it comes to testing. Whether it is platforms like Windows, Linux, Solaris or the browsers like Chrome, Firefox, Edge, IE, or Safari, Selenium allows platform-independent, cross-browser test functionality with no licensing costs. &lt;/p&gt;

&lt;p&gt;Here’s how to get started with the Automated UI testing of an application using Selenium WebDriver and JavaScript:&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites of the Setup Configuration
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Node.js (comes bundled with npm, i.e. Node package manager). For those comfortable with using Maven in Java, consider this to be the equivalent package manager for JS.&lt;/li&gt;
&lt;li&gt;Any IDE to write the code. The example in this article uses Eclipse.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Install Node.js npm
&lt;/h3&gt;

&lt;p&gt;One can &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;download Node.js and npm&lt;/a&gt;, then check that it is installed by running the following commands in the terminal.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;node -v  (to check Node.js is installed)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm -v (to check npm is installed)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once the user has installed Node.js, they will get access to the npm, an inbuilt package manager which will be used to install Selenium for JS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install Selenium WebDriver
&lt;/h3&gt;

&lt;p&gt;One can download Selenium WebDriver, and install it by running the following command in the terminal by using the Node’s built-in package manager (NPM) to get the package.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install –save selenium-webdriver&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;(–save creates a new package. This would be saved to the project’s package.json file.)&lt;/p&gt;

&lt;p&gt;From this &lt;a href="https://www.npmjs.com/package/selenium-webdriver" rel="noopener noreferrer"&gt;page&lt;/a&gt;, get download links to the actual drivers that Selenium uses to command different browsers.&lt;/p&gt;

&lt;p&gt;It is highly recommended to download links to drivers that the tester wants to work with (for example, Chrome and Firefox). Save them in a separate folder in separate directories and then add those folders to the system PATH. Once this is done, Selenium will be able to start the browser that the user tells it to, by using those executables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Install Eclipse
&lt;/h3&gt;

&lt;p&gt;To perform Automation Testing, IDE is a platform that is required to write the test script. Here we use Eclipse. You can &lt;a href="https://www.eclipse.org/downloads/" rel="noopener noreferrer"&gt;download Eclipse&lt;/a&gt;, and run the downloaded file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Install Selenium Webdriver and Client language bindings
&lt;/h3&gt;

&lt;p&gt;Selenium WebDriver and client language bindings are important to establish a connection between the WebDriver and the client and perform testing. Here are the links to install the Selenium WebDriver and client language bindings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://npmjs.org/package/selenium-webdriver" rel="noopener noreferrer"&gt;Download JavaScript Language Bindings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/SeleniumHQ/selenium/master/javascript/node/selenium-webdriver/CHANGES.md" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://seleniumhq.github.io/selenium/docs/api/javascript/index.html" rel="noopener noreferrer"&gt;API Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 5: Creating and running test script using JavaScript and Selenium
&lt;/h3&gt;

&lt;p&gt;Let’s write the first test script using JavaScript. The code will navigate to the Google.com page, and fetch its title on the console using the promise function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var webdriver = require(‘selenium-webdriver’);

var browser_name = new webdriver.Builder();

withCapabilities(webdriver.Capabilities.firefox()).build();

browser.get(‘http:/www.google.com’);

var promise = browser_name.getTitle();

promise.then(function(title) 

{

console.log(title);

});

browser.quit();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code sets aside the instance of Selenium WebDriver, and then builds the browser using WebDriver and the Firefox plugin. In the browser, the code opens Google and fetches its title using promise. This title is then sent as output to the console before quitting the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for using JavaScript with Selenium WebDriver
&lt;/h2&gt;

&lt;p&gt;Here are some of the best practices to follow while using JavaScript with Selenium for automated testing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use the Right Locators:&lt;/strong&gt; 
As the Selenium framework is meant to interact with the browser, it is essential to use the right locators for better navigation of the objects with the DOM (Document Object Model).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;- Perform Data-Driven Testing:&lt;/strong&gt; &lt;br&gt;
For accurate results, make sure the testing is data-driven, as it will help to perform functional testing faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Use PageObjects:&lt;/strong&gt; &lt;br&gt;
To enhance the overall maintenance and reduce redundancy and duplication, use PageObjects. Here the webpages are defined as classes, and the various elements on it are defined as variables, where the user interaction is implemented in the form of methods.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Choose the right selector order:&lt;/strong&gt;&lt;br&gt;
Selector Order is important for faster testing. Get the right Selector Order i.e. (XPath &amp;lt; CSS &amp;lt; Links Text &amp;lt; Name &amp;lt; ID) in place for better results. Learn about different locators in selenium.&lt;/p&gt;

&lt;p&gt;Selenium WebDriver has made automation testing easier and more efficient than ever. By using JavaScript to create test scripts, it is easy to perform automated UI Testing for applications. This is useful especially when development cycles are short and the features have to be added every few weeks to keep up with the users’ demand.&lt;/p&gt;

&lt;p&gt;Selenium is widely recommended due to the flexibility it offers. It supports major platforms like Windows, Linux, etc. and browsers like Chrome, IE, Edge, Firefox, and Safari as well as numerous scripts like Ruby, Perl, C#, Python, Java, JavaScript. With integrations of tools like TestNG Framework, one can get test results for further analysis, and improve the application.&lt;/p&gt;

&lt;p&gt;To create an application with the optimal user experience, use cloud based Automation Selenium Testing tools like BrowserStack that offers access to browsers and real devices to test on. Testing on a real device cloud helps offer a seamless cross platform experience.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>testing</category>
      <category>tutorial</category>
      <category>selenium</category>
    </item>
    <item>
      <title>Jenkins vs Gitlab: Differences</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Sat, 12 Feb 2022 09:03:29 +0000</pubDate>
      <link>https://dev.to/garima_writes/jenkins-vs-gitlab-differences-2feg</link>
      <guid>https://dev.to/garima_writes/jenkins-vs-gitlab-differences-2feg</guid>
      <description>&lt;p&gt;With the growing use of online platforms and the rise in the number of online products/service providers, user expectations are getting higher by the passing day. To keep up with tough online competition and retain customers, releasing advanced features regularly is essential.&lt;/p&gt;

&lt;p&gt;This is where the concepts of Continuous Integration (CI) and Continuous Development (CD) come into the &lt;a href="https://www.browserstack.com/guide/learn-software-development-process" rel="noopener noreferrer"&gt;software development process&lt;/a&gt;. Through CI/CD, the businesses are able to put up their software applications for their audiences’ use and add advanced features from time to time via release cycles.&lt;/p&gt;

&lt;p&gt;Jenkins and Gitlab are open source CI/CD servers that enable automation for various stages of software development, testing, and deployment. This article compares these two widely used CI/CD servers. But before they are compared, let’s discuss these servers and how they function individually.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Jenkins?
&lt;/h2&gt;

&lt;p&gt;Jenkins is an automation server that is self-contained and open source. It allows the building, testing, and deployment for every release cycle of software. Through its fleet of &lt;a href="https://plugins.jenkins.io/" rel="noopener noreferrer"&gt;plugins&lt;/a&gt; (over 1700) that seamlessly integrate with most &lt;a href="https://www.browserstack.com/blog/best-ci-cd-tools-comparison/" rel="noopener noreferrer"&gt;CI/CD tools&lt;/a&gt;, Jenkins offers flexibility and covers almost all functional requirements.&lt;/p&gt;

&lt;p&gt;Moreover, since Jenkins is written in Java, it is compatible with any system that has Java Runtime Environment (JRE) installed. This makes Jenkins widely usable due to its easy availability.&lt;/p&gt;

&lt;p&gt;Jenkins is one of the most popular CI/CD automation servers in existence due to the following features:&lt;/p&gt;

&lt;h3&gt;
  
  
  - Easy Installation
&lt;/h3&gt;

&lt;p&gt;It is self-contained and offers complete installation packages for various operating systems such as Windows, Mac OS X, and Unix-based systems. To install Jenkins, all one needs is JRE installed in the system.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Easy Configuration
&lt;/h3&gt;

&lt;p&gt;Configuring Jenkins is easy as it can be set up through its web interface. The web interface is very user-friendly, and configuration becomes easier with the built-in help offered by Jenkins.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Open Source
&lt;/h3&gt;

&lt;p&gt;Jenkins is open source, so one can save on the hefty cost of license fees.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Distribution
&lt;/h3&gt;

&lt;p&gt;Jenkins allows its users to distribute the workload across various machines located at different locations. With builds, tests, and deployments placed across multiple platforms, the process becomes faster as the system offers more productivity by working in parallel on different systems. This saves time and reduces the time frame of release cycles.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Extensible
&lt;/h3&gt;

&lt;p&gt;Jenkins can be used to deliver over a fleet of functionalities due to strong plugin support. One can use Jenkin for projects as simple as those just requiring a CI server to complex projects involving CD.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Plugins
&lt;/h3&gt;

&lt;p&gt;Jenkins offers comprehensive support for a wide range of plugins, where the user has the flexibility to choose a plugin that fits their business requirements. The massive number of plugins (1700+) are updated from time to time and offer every possible CI/CD functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Strong Community Support
&lt;/h3&gt;

&lt;p&gt;Jenkins has a strong and vibrant community of technical experts who support others working on Jenkins. This makes it easier to find solutions to possible issues through mutual cooperation and sharing ideas.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is GitLab?
&lt;/h2&gt;

&lt;p&gt;GitLab is a self-contained platform that supports the &lt;a href="https://about.gitlab.com/stages-devops-lifecycle/" rel="noopener noreferrer"&gt;DevOps lifecycle&lt;/a&gt; through its web-based services. It manages the Git-repository through its Continuous Integration and Deployment pipelines, issue-tracking features, and wiki to store relevant files.&lt;/p&gt;

&lt;p&gt;GitLab works on a freemium basis, i.e., it offers both free and paid services. It enables automation of the entire &lt;a href="https://www.browserstack.com/guide/devops-for-beginners" rel="noopener noreferrer"&gt;DevOps&lt;/a&gt; lifecycle, which involves planning, building, testing, deployment, and monitoring through release cycles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stages of DevOps Lifecycle&lt;/strong&gt;&lt;br&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%2F14kxisia2le9w9d8ua3v.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%2F14kxisia2le9w9d8ua3v.png" alt="Stages of DevOps Lifecycle" width="512" height="54"&gt;&lt;/a&gt;&lt;br&gt;
Source: GitLab Documentation&lt;/p&gt;

&lt;p&gt;GitLab enables Concurrent DevOps, which speeds up the development lifecycle. Through its services, GitLab combines Development, Security, and Ops to deliver faster with utmost security. It is written in Ruby, but the tech stack includes Go, Ruby on Rails, and Vue.js.&lt;/p&gt;

&lt;p&gt;GitLab has gained a lot of traction in the CI/CD landscape due to the following features:&lt;/p&gt;

&lt;h3&gt;
  
  
  - Insights
&lt;/h3&gt;

&lt;p&gt;GitLab offers business insights that help manage the business aspects of the product. These insights allow users to keep track of changes implemented in the system and their implications on product performance. However, this feature is only available for paid versions.&lt;/p&gt;

&lt;h3&gt;
  
  
  - User Role Management
&lt;/h3&gt;

&lt;p&gt;It offers user role compliances to make the process more streamlined and secure. In addition to this, GitLab also provides user statistics that help in resource management and improve project management efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Issues Tracking
&lt;/h3&gt;

&lt;p&gt;Tracking and assigning issues is easy with Gitlab through Task Lists, Thread Discussions, Labels, Milestones, Importing of issues from JIRA, and many more features, that allows effective resolution of issues through proactive, effortless tracking.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Merge Management
&lt;/h3&gt;

&lt;p&gt;Collaborating and Version Control become seamless with GitLab due to easily implemented code merge requests and merge management systems done upon code review of branches.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Plugins
&lt;/h3&gt;

&lt;p&gt;GitLab is well supported by several plugins that help make the different stages of DevOps a lot more efficient. These plugins can be used depending upon business requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Support
&lt;/h3&gt;

&lt;p&gt;GitLab offers Service Level Agreements (SLAs) and 24×5 Technical Support to paid users. They also have extensive and comprehensive documentation, covering a vast number of issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Community
&lt;/h3&gt;

&lt;p&gt;It has a vibrant community forum that allows the users and technical experts from different parts of the world to connect, share their ideas, and collaborate for building better DevOps practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Jenkins vs GitLab
&lt;/h2&gt;

&lt;h3&gt;
  
  
  - Language
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Java&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Ruby&lt;/p&gt;

&lt;h3&gt;
  
  
  - Ease of Installation
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Easy to Install&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;:Easy to Install&lt;/p&gt;

&lt;h3&gt;
  
  
  - Plugins
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: 1700+ plugins available&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Limited Plugins&lt;/p&gt;

&lt;h3&gt;
  
  
  - Prerequisites
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: JRE should be installed&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Ruby, Go, Git, Node.js, and Redis should be installed&lt;/p&gt;

&lt;h3&gt;
  
  
  - Operating Systems Supported
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Windows, Mac OS X, and Unix-like OS&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Supports only particular Unix-like OS such as Ubuntu, Debian, Red Hat Linux, Scientific Linux, Oracle Linux, CentOS, and OpenSUSE. It does not support Windows and macOS&lt;/p&gt;

&lt;h3&gt;
  
  
  - Open Source
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Open Source and Free&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Open Source and Freemium&lt;/p&gt;

&lt;h3&gt;
  
  
  - Issue Tracking
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Don’t have such functionality&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Offers various features for issue tracking and management&lt;/p&gt;

&lt;h3&gt;
  
  
  - Extensiveness
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Highly extensive as it can be used as a simple CI server or can be transformed into a complex CD system with the help of plugins&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Offers scalability to enhance the DevOps lifecycle for a project&lt;/p&gt;

&lt;h3&gt;
  
  
  - Support
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt;: Offers documentation and open source community support, but no technical support is provided as part of the SLA&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Provides 24×5 support for paid users and only self-support documents to free users as part of the SLA &lt;/p&gt;

&lt;h2&gt;
  
  
  Which one is better: Jenkins or GitLab?
&lt;/h2&gt;

&lt;p&gt;Both Jenkins and GitLab have their own set of pros and limitations, which means choosing between them is subjective to the scenario they will be used for. Although Jenkins offers more flexibility and just requires JRE as a prerequisite, it lacks support for SLA and project management features that GitLab offers. However, each of them is at par when supporting CI/CD for a software project through their advanced infrastructure and features.&lt;/p&gt;

&lt;p&gt;Thus, it depends on the project requirements and the priorities to choose one among these two CI/CD servers.&lt;/p&gt;

&lt;p&gt;No matter which CI/CD server is chosen, testing the application’s cross-platform compatibility on real browsers and devices is mandatory. It is the only way to guarantee that the software delivers seamless and consistent UX irrespective of the device and browser used to access them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/emulators-simulators" rel="noopener noreferrer"&gt;Emulators and simulators&lt;/a&gt; simply do not offer the &lt;a href="https://www.browserstack.com/real-user-conditions-testing-on-browserstack" rel="noopener noreferrer"&gt;real user conditions&lt;/a&gt; that software must run within, making the results of any tests run on them inaccurate. Consider testing websites and apps on a &lt;a href="https://www.browserstack.com/real-device-cloud" rel="noopener noreferrer"&gt;real device cloud&lt;/a&gt;, preferably one that offers the latest devices, browsers, and OS versions. This applies to both manual and automated testing.&lt;/p&gt;

</description>
      <category>jenkins</category>
      <category>gitlab</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to configure Selenium in Eclipse</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Fri, 04 Feb 2022 13:15:23 +0000</pubDate>
      <link>https://dev.to/garima_writes/how-to-configure-selenium-in-eclipse-41jk</link>
      <guid>https://dev.to/garima_writes/how-to-configure-selenium-in-eclipse-41jk</guid>
      <description>&lt;p&gt;Managing user experience is pivotal for software development. Test automation enables user preferences and convenience to remain at the center of the development process while saving time and effort. That is why comprehensive automation testing has become necessary to retain customers and meet their expectations. With significantly shorter time frames for development, Selenium Testing, in particular, has become an integral part of the development to facilitate automated testing of web applications. &lt;/p&gt;

&lt;p&gt;Selenium is the most popular automated tool in existence today. &lt;a href="https://www.selenium.dev/blog/2021/selenium-survey-results/" rel="noopener noreferrer"&gt;59.5%&lt;/a&gt; of people consider Selenium for Cross Browser Testing because of the robustness and flexibility it offers by supporting multiple languages like Java, C#, Python, Perl, Ruby, etc. However, a majority (67%) of the Selenium users prefer Java as their language for &lt;a href="https://www.browserstack.com/selenium" rel="noopener noreferrer"&gt;Selenium Testing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This article discusses &lt;a href="https://www.browserstack.com/guide/how-to-setup-selenium-in-eclipse" rel="noopener noreferrer"&gt;how to configure Selenium in Eclipse&lt;/a&gt; to use Selenium for Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites for configuring Selenium in Eclipse
&lt;/h2&gt;

&lt;h3&gt;
  
  
  - &lt;a href="https://www.oracle.com/java/technologies/javase-jdk16-downloads.html" rel="noopener noreferrer"&gt;Install Java&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Download Java SE Development Kit 16.0.2 according to the Windows, Linux, or macOS platform being used.&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%2Fwgppzmis0umfgdw6jjkz.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%2Fwgppzmis0umfgdw6jjkz.png" alt="Image description" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run the JDK Installer by double-clicking on the file name in the download location and following the instructions on the instruction wizard. Alternatively, silently install JDK by entering the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;jdk.exe /s&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  - &lt;a href="https://www.eclipse.org/downloads/" rel="noopener noreferrer"&gt;Install Eclipse IDE&lt;/a&gt;
&lt;/h3&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%2Fx10xj34f5vmtjjcotu7v.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%2Fx10xj34f5vmtjjcotu7v.png" alt="Image description" width="800" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  - &lt;a href="https://www.selenium.dev/downloads/" rel="noopener noreferrer"&gt;Install Selenium&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Download and Install Selenium to be set up in Eclipse.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Install Browser Driver
&lt;/h3&gt;

&lt;p&gt;For &lt;a href="https://www.browserstack.com/cross-browser-testing" rel="noopener noreferrer"&gt;Cross Browser Testing&lt;/a&gt;, download the relevant Browser Driver – &lt;a href="https://chromedriver.chromium.org/" rel="noopener noreferrer"&gt;ChromeDriver&lt;/a&gt; (for Chrome), &lt;a href="https://github.com/mozilla/geckodriver" rel="noopener noreferrer"&gt;GeckoDriver&lt;/a&gt; (for Firefox), &lt;a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/" rel="noopener noreferrer"&gt;SafariDriver&lt;/a&gt;(for Safari), and &lt;a href="https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver" rel="noopener noreferrer"&gt;InternetExplorerDriver&lt;/a&gt; and &lt;a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/" rel="noopener noreferrer"&gt;MSEdgeDriver&lt;/a&gt; (IE and Edge respectively). Place these Browser Driver files in a directory that is part of the environment PATH. This will allow a command-line call to the programs to execute them irrespective of the working directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  - Install Java Language Bindings
&lt;/h3&gt;

&lt;p&gt;-&lt;a href="https://github.com/SeleniumHQ/selenium/releases/download/selenium-3.141.59/selenium-java-3.141.59.zip" rel="noopener noreferrer"&gt;Version 3.141.59 (2018)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-&lt;a href="https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-&lt;a href="https://seleniumhq.github.io/selenium/docs/api/java/index.html" rel="noopener noreferrer"&gt;API Docs&lt;br&gt;&lt;br&gt;
&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%2Fj53qndj1lv31mkmxvsin.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%2Fj53qndj1lv31mkmxvsin.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to configure Selenium in Eclipse
&lt;/h2&gt;

&lt;p&gt;Here are the steps to configure Selenium Webdriver with Eclipse:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Launch Eclipse
&lt;/h3&gt;

&lt;p&gt;To launch Eclipse double click on the eclipse.exe file in the download location.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Create Workspace in Eclipse
&lt;/h3&gt;

&lt;p&gt;This workspace named “C:\BrowserStack” is like any other folder, which will store all the test scripts. Launch the BrowserStack workspace.&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%2Fnhpumxpuutl4i4n1gb3r.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%2Fnhpumxpuutl4i4n1gb3r.png" alt="Creating Workspace in Eclipse" width="800" height="494"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Creating Workspace in Eclipse&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create New Java Project in the BrowserStack Workspace
&lt;/h3&gt;

&lt;p&gt;Create a new Java Project by clicking on &lt;strong&gt;File &amp;gt; New &amp;gt; Java Project&lt;/strong&gt; and name it. &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%2Fmizfypmlk8zoyl9g1ypj.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%2Fmizfypmlk8zoyl9g1ypj.png" alt="Image description" width="512" height="480"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Creating a new Java Project&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Create Package and Class under the Java Project
&lt;/h3&gt;

&lt;p&gt;By clicking on the src folder (which is the source folder), create a new package and name it (BrowserStack). Then right-click on the package name and create a class.  &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%2Ft4n76nl01i4jd0zob3v1.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%2Ft4n76nl01i4jd0zob3v1.png" alt="Creating Package in the Java Project" width="494" height="512"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Creating Package in the Java Project&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%2Fufgfiflp0uqvbzji9xj4.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%2Fufgfiflp0uqvbzji9xj4.png" alt="Creating Class in the BrowserStack Package" width="512" height="447"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Creating Class in the BrowserStack Package&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Add Selenium JARs to the Java Project in Eclipse
&lt;/h3&gt;

&lt;p&gt;To add the Selenium Jars to the BrowserStack Java right click on the BrowserStack Project folder and select the Properties option. In the properties window, click on the &lt;strong&gt;Java Build Path&lt;/strong&gt; and &lt;strong&gt;Add External JARs&lt;/strong&gt;. Browse and add the downloaded Selenium JARs i.e. Client Combined JAR and all the JARs under the Libs folder, then click &lt;strong&gt;Apply and Close&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%2F0673ykj5zqn6q0eqzupw.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%2F0673ykj5zqn6q0eqzupw.png" alt="Adding Selenium JARs in the BrowserStack Project" width="512" height="319"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Adding Selenium JARs in the BrowserStack Project&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This configures Selenium with Eclipse, making it ready to execute the first test script.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/guide/automation-testing-tutorial" rel="noopener noreferrer"&gt;Automation testing&lt;/a&gt; using Selenium with Java has simplified software development. Being an open-source tool, it provides an opportunity to speed up the time of execution and remove errors for a better user experience. &lt;/p&gt;

&lt;p&gt;Java is quite popular among the developers, given the extensive support being available, making it a preferred choice as a Selenium Client Language Binding. Selenium with Java has proved helpful in optimizing regression testing and cross browser testing. With the support of Continuous Integration tools like Jenkins, Selenium with Java can be used in continuous delivery models. &lt;/p&gt;

</description>
      <category>selenium</category>
      <category>testing</category>
      <category>eclipse</category>
      <category>java</category>
    </item>
    <item>
      <title>Browser compatibility for ReactJS web apps</title>
      <dc:creator>Garima Tiwari</dc:creator>
      <pubDate>Sun, 30 Jan 2022 16:25:14 +0000</pubDate>
      <link>https://dev.to/garima_writes/browser-compatibility-for-reactjs-web-apps-2p1g</link>
      <guid>https://dev.to/garima_writes/browser-compatibility-for-reactjs-web-apps-2p1g</guid>
      <description>&lt;p&gt;User Experience is the key to customer delight and by ensuring a high-quality user experience through software development companies retain their customers. With the availability of a large number of devices and browsers, cross browser compatibility is essential for a seamless and consistent experience as the user switches between different devices and browsers. Cross Browser Testing thus becomes a non-negotiable and very essential part of the software development lifecycle. &lt;/p&gt;

&lt;p&gt;ReactJS is one of the most popularly used web frameworks among the developers as of 2021, hence understanding ReactJS browser compatibility is important to achieve the best results. As a &lt;a href="https://www.statista.com/statistics/1124699/worldwide-developer-survey-most-used-frameworks-web/" rel="noopener noreferrer"&gt;report by Statista&lt;/a&gt; suggests, over 40% of the developers use ReactJS to develop web applications.&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%2Fxa3vor2wxpar2vqharja.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%2Fxa3vor2wxpar2vqharja.png" alt="Image description" width="800" height="923"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross Browser Compatibility with ReactJS
&lt;/h2&gt;

&lt;p&gt;To have a sound knowledge of ReactJS cross-browser compatibility, it is essential to first understand how ReactJS works.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does ReactJS work?
&lt;/h3&gt;

&lt;p&gt;ReactJS is an open-source JavaScript library that supports the front-end and the server using Document Object Model (DOM). It is used for UI development, wherein the user interface of the web application is developed as UI components that are aligned together for a complex comprehensive user experience. These UI components are isolated portions of the UI, based on the functions of the elements, which are further interconnected for an overall user experience. &lt;/p&gt;

&lt;p&gt;Unlike other JavaScript frameworks, ReactJS does not work with Real DOMs, rather it has a Virtual DOM, which is a lightweight representation of the Real DOMs in JavaScript. Here the DOM is represented through a Tree Data Structure with a node for each of the UI elements. This makes the updates faster, as the entire DOM is not changed but only the difference patch is updated by recognizing the affected nodes, which speeds up the loading. Moreover, ReactJS supports both client-side and server-side rendering, which further streamlines the user interface.&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%2Ftydj87d4onakpm5wlk3o.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%2Ftydj87d4onakpm5wlk3o.png" alt="Image description" width="512" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React Cross Browser Compatibility
&lt;/h2&gt;

&lt;p&gt;ReactJS offers code reusability, where a single piece of code for a UI component can be used across different platforms. This support for all the major browsers and platforms reflects React Cross Browser compatibility. Although a lot of the cross-browser compatibility is taken care of by the ReactJS itself, still Cross Browser Testing is important as some of the older versions of browsers have few limitations.&lt;/p&gt;

&lt;p&gt;However, as React has individual UI components, &lt;a href="https://www.browserstack.com/cross-browser-testing" rel="noopener noreferrer"&gt;Cross Browser Testing&lt;/a&gt; becomes easier and managing UX consistency across different browsers, platforms, and devices is simple. The testers can check for the &lt;a href="https://www.browserstack.com/guide/html5-browser-compatible" rel="noopener noreferrer"&gt;HTML5&lt;/a&gt; and &lt;a href="https://www.browserstack.com/guide/css-for-browser-compatibility" rel="noopener noreferrer"&gt;CSS&lt;/a&gt; codes of the elements to ensure cross-browser compatibility, in cases where certain features might cause inconsistencies for several browser versions.&lt;/p&gt;

&lt;p&gt;Additionally, older versions can be supported by adding polyfills in a ReactJS web app to achieve cross browser compatibility. These polyfills are third-party JS files that work similarly to JS libraries. However, polyfills are also capable of providing new functionalities. For example, a polyfill can be used to support ES6-based features in browsers that fundamentally don’t.&lt;/p&gt;

&lt;p&gt;When a ReactJS web app Airbnb was tested on different Real Devices using a &lt;a href="https://www.browserstack.com/real-device-cloud" rel="noopener noreferrer"&gt;Real Device Cloud&lt;/a&gt;(desktops, mobiles, and tablets) across iOS and Android platforms, it was observed that the Airbnb app worked consistently on all the devices. It offered a seamless functionality providing the same user experience across different platforms and devices. Hence, it can be concluded that the Airbnb web app built using ReactJS is cross browser compatible, depicting the high browser compatibility offered by ReactJS framework.&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%2Ff7e5ft7g9kzee4xfj1ji.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%2Ff7e5ft7g9kzee4xfj1ji.png" alt="Image description" width="800" height="450"&gt;&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%2Fkjy9muv7n551ah5qdlku.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%2Fkjy9muv7n551ah5qdlku.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ReactJS is one of the most popular web frameworks to build dynamic web applications. In a time when UX is pivotal and each of the web applications is accessed through multiple browsers and devices, it becomes essential to ensure a consistent user experience across browsers. Hence, React cross browser compatibility is significant during software development. By performing cross-browser tests on real browsers and devices, the tester could detect and highlight functionalities in the UX that are inconsistent with specific browser versions, which can later be fixed at the backend. &lt;/p&gt;

</description>
      <category>react</category>
      <category>testing</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
