SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
CROSS BROWSER TESTING USING BROWSERSTACK
By: Mary Geethu. C. A
Automation Test Engineer, RapidValue Solutions
Cross browser testing using BrowserStack
© RapidValue Solutions 2
Contents
Introduction ....................................................................................................................................................................3
How does it work?..........................................................................................................................................................4
BrowserStack Live .........................................................................................................................................................5
BrowserStack Automate.................................................................................................................................................6
Setting your operating system, browser, and screen resolution.....................................................................................7
Run tests on mobile browsers........................................................................................................................................7
Screenshots .................................................................................................................................................................11
Responsive ..................................................................................................................................................................11
Conclusion ...................................................................................................................................................................12
Cross browser testing using BrowserStack
© RapidValue Solutions 3
Introduction
BrowserStack is a cross-browser testing tool which allows users to test websites in 700+ desktop and
mobile browsers. BrowserStack offers virtualization for:
 Windows XP, 7 and 8
 OSX Snow Leopard, Lion and Mountain Lion
 iOS
 Android
 Opera Mobile
Depending on the operating system you choose, BrowserStack offers a number of supported browsers
for the specific OS.
Cross browser testing using BrowserStack
© RapidValue Solutions 4
How does it work?
Browser stack follows a „pay as service‟ model and the pricing is reasonable. The registered users can sign and will
be allowed to access the dashboard, which offers a quick start dialogue.
This allows you to, easily, enter the URL, you'd like to test via the dropdowns, the target OS and browser
version. You can fine tune things via the left panel which offers screen resolution choices and page
rendering speed simulation. Clicking “start” commences the process of establishing the connection, via
Flash, to the remote server and rendering the virtualized browser.
You have full access to the web page's functionality including menus, buttons, and so on. This also,
includes the developer tools that come with browsers. You have access to tools like Firefox Web
Developer Tools, the IE F12 Tools and the Chrome Developer Tools.
Cross browser testing using BrowserStack
© RapidValue Solutions 5
So, not only can you see how your pages will render across browsers but you can also, use the existing
tools to debug common issues.
BrowserStack Live
The main area allows you to specify a public address or even use it to test internal applications on your
network. The dropdown menus on the upper left of the page allows you to choose the operating system
and browser.
The dropdown menus on the upper left of the page allow you to choose the operating system and
browser.
Cross browser testing using BrowserStack
© RapidValue Solutions 6
BrowserStack Automate
BrowserStack Automate provides a platform to run automated browser tests using, either, the Selenium
or JavaScript testing framework. Tests can be customized, using capabilities, which are a series of key-
value pairs used to pass values to the tests. Selenium has a set of default capabilities, whereas
BrowserStack has created specific capabilities to increase the customization available to users.
BrowserStack supports various languages like Python, Ruby, Java, Perl, C# and Node js.
Automate test scripts in Java: Running your Selenium tests on BrowserStack requires a username and
an access key. To obtain your username and access keys, sign up for a „free trial‟ or „purchase‟ a plan.
BrowserStack supports Selenium automated tests, and running your tests on our cloud setup is simple
and straightforward.
//Download java driver bindings from http://www.seleniumhq.org/download/
Configuring Capabilities
To run on BrowserStack, the Selenium capabilities have to be changed. In this example, the browser is
Firefox.
WebDriver driver = new RemoteWebDriver(
Cross browser testing using BrowserStack
© RapidValue Solutions 7
new URL("http://USERNAME:ACCESS_KEY@hub.browserstack.com/wd/hub"),
DesiredCapabilities.firefox()
);
Setting your operating system, browser, and screen
resolution
You can run your Selenium test scripts on any browser by specifying the browser name, version and
resolution in the input capabilities.
Parameter override rules: When specifying both default and BrowserStack-specific capabilities, the
following rules define any overrides that take place:
 If browser and browserName, both, are defined, browser has precedence (except
if browserName is Android, iPhone, or iPad, in which cases browser is ignored and the default
browser on those devices is selected).
 If browser_version and version, both, are defined, browser_version has precedence.
 If OS and platform, both, are defined, OS has precedence.
 Platform and os_version cannot be defined together, if os has not been defined
 os_version can, only, be defined when OS has been defined.
 The value ANY, if given to any parameter, is same, as the parameter preference is not specified.
 Default browser is chrome, when no browser is passed by the user or the selenium API
(implicitly).
The following example has Firefox selected as browser, 35.0 as browser version and 1024x768 as
resolution.
caps.setCapability("browser", "Firefox");
caps.setCapability("browser_version", "35.0");
caps.setCapability("os", "Windows");
caps.setCapability("os_version", "7");
caps.setCapability("resolution", "1024x768");
Run tests on mobile browsers
You can run your Selenium test scripts on iOS and Android devices by specifying the version and device
in the input capabilities. These capabilities are browserName and device. The following example
has iPhone selected as the browserName, and iPhone 5 as the device.
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("browserName", "iPhone");
Cross browser testing using BrowserStack
© RapidValue Solutions 8
caps.setPlatform(Platform.MAC);
caps.setCapability("device", "iPhone 5");
Example: Sending an Email with Gmail
package com.rvs.automation;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class SendMail{
WebDriverWait wait;
RemoteWebDriver driver;
public static final String USERNAME = "geethuca2";
public static final String AUTOMATE_KEY = "9Cqqo4xnu497CS3YTUXE";
public static final String URL = "http://" + USERNAME + ":" + AUTOMATE_KEY +
"@hub.browserstack.com/wd/hub";
Cross browser testing using BrowserStack
© RapidValue Solutions 9
@BeforeTest
public void setUp() throws MalformedURLException
{
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("browser", "Firefox");
caps.setCapability("browser_version", "35.0");
caps.setCapability("os", "Windows");
caps.setCapability("os_version", "7");
caps.setCapability("resolution", "1024x768");
caps.setCapability("browserstack.debug", "true");
driver = new RemoteWebDriver(new URL(URL), caps);
driver.navigate().to("http://www.gmail.com");
System.out.println(driver.getTitle());
wait=new WebDriverWait(driver, 10);
}
@Test
public void gudlyWebTest() throws InterruptedException, IOException
{
sendEmail();
}
Public void sendEmail()throws InterruptedException
{
//getting email textbox
WebElement Username= driver.findElement(By.xpath("//input[@id='Email']"));
Username.sendKeys("rvs4test@gmail.com ");
//getting password textbox
WebElement Password= driver.findElement(By.xpath("//input[@id='Passwd']"));
Password.sendKeys("Rapid123");
Cross browser testing using BrowserStack
© RapidValue Solutions 10
//clicking signin button
WebElement signin= driver.findElement(By.xpath("//input[@id='signIn']"));
signin.click();
System.out.println("your logging in");
//clicking compose button
WebElement compose= driver.findElement(By.xpath("//div[@class='T-I J-J5-Ji T-I-KE L3']"));
compose.click();
System.out.println("Loading Composer");
//entering „to‟ address field
WebElement toAddress= driver.findElement(By.name("to"));
toAddress.sendKeys("sparkqatest@gmail.com");
//entering subject of mail
WebElement subject = driver.findElement(By.name("subjectbox"));
subject.sendKeys("Automated email");
//switch to frame
driver.switchTo().frame(driver.findElement(By.xpath("//iframe[contains(@tabindex,'1') and
contains(@frameborder,'0')]")));
//entering text into email body
driver.findElement(By.xpath("//*[@id=':ak']")).sendKeys("Hi" +"n"+ " Sending an automated mail
");
//switching back from frame
driver.switchTo().defaultContent();
//clicking send button
driver.findElement(By.xpath("//div[text()='Send']")).click();
driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);
System.out.println("Sending email");
}
}
}
Cross browser testing using BrowserStack
© RapidValue Solutions 11
@AfterTest
public void terminatetest()
{
driver.quit();
}
}
Screenshots
Screenshots are used to conduct rapid layout testing of websites. It can instantly generate screenshots of
a website across a range of 650+ browsers, by selecting 25 browsers at a time. The screenshots can,
then, be downloaded for comparison and future reference. BrowserStack also provides API access for
headless creation of screenshots over a selection of operating systems and browsers. Screenshots has
two third-party tools: ScreenShooter and Python API wrapper.
Responsive
Responsive is a feature used to test the responsiveness of website layouts and designs. Responsive
comes bundled with screenshots, and it operates in a similar way. It can generate screenshots over a
range of screen sizes, where the screen sizes are true to the devices, and have the actual resolutions
and viewports set.
BrowserStack provides the following devices in Responsive:
Device Resolution Size Viewport
iPhone 5S 640x1136 4 320x568
Galaxy S5
Mini
720x1280 4.5 360x640
Galaxy S5 1080x1920 5.1 360x640
Note 3 1080x1920 5.7 360x640
iPhone 6 750x1334 4.7 375x667
Nexus 4 738x1280 4.7 384x640
iPhone 6 Plus 1080x1920 5.5 414x736
Kindle Fire
HDX 7
1200x1920 7 600x960
iPad Mini 2 1536 x 2048 7.9 768 x 1024
iPad Air 1536x2048 9.7 768 x 1024
Galaxy Tab 2 800x1280 10.1 800x1280
Windows 7 1280x1024 N/A 1280x1024
OS X
Yosemite
1920x1080 N/A 1920x1080
Cross browser testing using BrowserStack
© RapidValue Solutions 12
Conclusion
You can create URLs with the testing options as parameters. This helps you to, instantly, start a browser
on BrowserStack. You can integrate these URLs into your application, bookmark them and also, share
them with others.
Local testing allows you to test your private and internal servers, along with public URLs, using the
BrowserStack Cloud. The BrowserStack Cloud has support for firewalls, proxies and Active Directory.
Cross browser testing using BrowserStack
© RapidValue Solutions 13
About US
RapidValue is a leading provider of end-to-end mobility, omnichannel and cloud solutions to enterprises
worldwide. Armed with a large team of experts in consulting and application development, along with
experience delivering global projects, we offer a range of mobility and cloud services across industry
verticals. RapidValue delivers its services to the world‟s top brands and Fortune 1000 companies, and
has offices in the United States and India.
Disclaimer:
This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it
may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended
recipient of this report, you are hereby notified that the use, circulation, quoting, or reproducing of this report is
strictly prohibited and may be unlawful.
© RapidValue Solutions
www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com
+1 877.643.1850 contactus@rapidvaluesolutions.com

Contenu connexe

Tendances

Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
shreyas JC
 

Tendances (20)

Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
testng
testngtestng
testng
 
Api testing
Api testingApi testing
Api testing
 
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile Apps
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
Appium ppt
Appium pptAppium ppt
Appium ppt
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Katalon: Mobile and Browser-Based Automation | Quality Jam 2018
Katalon: Mobile and Browser-Based Automation | Quality Jam 2018Katalon: Mobile and Browser-Based Automation | Quality Jam 2018
Katalon: Mobile and Browser-Based Automation | Quality Jam 2018
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
 

En vedette

Loadster Load Testing by RapidValue Solutions
Loadster Load Testing by RapidValue SolutionsLoadster Load Testing by RapidValue Solutions
Loadster Load Testing by RapidValue Solutions
RapidValue
 
MySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue SolutionsMySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue Solutions
RapidValue
 
Automating the responsive website testing
Automating the responsive website testingAutomating the responsive website testing
Automating the responsive website testing
Birudugadda Pranathi
 
Testing responsive web design pdf
Testing responsive web design pdfTesting responsive web design pdf
Testing responsive web design pdf
crilusi
 
Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...
Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...
Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...
RapidValue
 

En vedette (20)

Responsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen FrameworkResponsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen Framework
 
Predictability for the Web
Predictability for the WebPredictability for the Web
Predictability for the Web
 
Guide To Effective Cross Browser Testing
Guide To Effective Cross Browser TestingGuide To Effective Cross Browser Testing
Guide To Effective Cross Browser Testing
 
Loadster Load Testing by RapidValue Solutions
Loadster Load Testing by RapidValue SolutionsLoadster Load Testing by RapidValue Solutions
Loadster Load Testing by RapidValue Solutions
 
How To Automate Cross Browser Testing
How To Automate Cross Browser TestingHow To Automate Cross Browser Testing
How To Automate Cross Browser Testing
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
 
MySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue SolutionsMySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue Solutions
 
Designing Responsive Websites
Designing Responsive WebsitesDesigning Responsive Websites
Designing Responsive Websites
 
Cross browser testing
Cross browser testingCross browser testing
Cross browser testing
 
Berlin Selenium Meetup - Galen Framework
Berlin Selenium Meetup -  Galen FrameworkBerlin Selenium Meetup -  Galen Framework
Berlin Selenium Meetup - Galen Framework
 
Automated layout testing using Galen Framework
Automated layout testing using Galen FrameworkAutomated layout testing using Galen Framework
Automated layout testing using Galen Framework
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
 
Get responsive with Galen
Get responsive with GalenGet responsive with Galen
Get responsive with Galen
 
Approach to Unified Mobile Application Implementation for Multisystem Integra...
Approach to Unified Mobile Application Implementation for Multisystem Integra...Approach to Unified Mobile Application Implementation for Multisystem Integra...
Approach to Unified Mobile Application Implementation for Multisystem Integra...
 
Cross-browser testing in the real world
Cross-browser testing in the real worldCross-browser testing in the real world
Cross-browser testing in the real world
 
Automating the responsive website testing
Automating the responsive website testingAutomating the responsive website testing
Automating the responsive website testing
 
Testing responsive web design pdf
Testing responsive web design pdfTesting responsive web design pdf
Testing responsive web design pdf
 
Testing Responsive Webdesign
Testing Responsive WebdesignTesting Responsive Webdesign
Testing Responsive Webdesign
 
Visual Regression Testing
Visual Regression TestingVisual Regression Testing
Visual Regression Testing
 
Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...
Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...
Unified Mobile Application to Integrate SalesForce, Oracle EBS, Taleo, Outloo...
 

Similaire à Cross browser testing using BrowserStack

Dhct config report
Dhct config reportDhct config report
Dhct config report
San Man
 
Qtp complete guide for all
Qtp complete guide for allQtp complete guide for all
Qtp complete guide for all
Ramu Palanki
 
Java Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant VulnerabilitiesJava Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant Vulnerabilities
Lumension
 

Similaire à Cross browser testing using BrowserStack (20)

Dhct config report
Dhct config reportDhct config report
Dhct config report
 
Qtp basics
Qtp basicsQtp basics
Qtp basics
 
Qtp complete guide for all
Qtp complete guide for allQtp complete guide for all
Qtp complete guide for all
 
Load Runner
Load RunnerLoad Runner
Load Runner
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
How to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdfHow to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdf
 
jDriver Presentation
jDriver PresentationjDriver Presentation
jDriver Presentation
 
Selenium Testing with TestingBot.com
Selenium Testing with TestingBot.comSelenium Testing with TestingBot.com
Selenium Testing with TestingBot.com
 
Selenium With Spices
Selenium With SpicesSelenium With Spices
Selenium With Spices
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI Frameworks
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012
 
Selenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSelenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit Pathak
 
Java Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant VulnerabilitiesJava Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant Vulnerabilities
 
Top 10 cross browser testing tools in 2021
Top 10 cross browser testing tools in 2021Top 10 cross browser testing tools in 2021
Top 10 cross browser testing tools in 2021
 
Qa process
Qa processQa process
Qa process
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Real-Time Communication Testing Evolution with WebRTC
Real-Time Communication Testing Evolution with WebRTCReal-Time Communication Testing Evolution with WebRTC
Real-Time Communication Testing Evolution with WebRTC
 
Saucery for Saucelabs
Saucery for SaucelabsSaucery for Saucelabs
Saucery for Saucelabs
 
Qa process
Qa processQa process
Qa process
 

Plus de RapidValue

The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
RapidValue
 

Plus de RapidValue (20)

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins Pipeline
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in KotlinGuide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture -  Top Trends & Key Business BenefitsMicroservices Architecture -  Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack ChannelReal-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using ValgrindHow to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Cross browser testing using BrowserStack

  • 1. CROSS BROWSER TESTING USING BROWSERSTACK By: Mary Geethu. C. A Automation Test Engineer, RapidValue Solutions
  • 2. Cross browser testing using BrowserStack © RapidValue Solutions 2 Contents Introduction ....................................................................................................................................................................3 How does it work?..........................................................................................................................................................4 BrowserStack Live .........................................................................................................................................................5 BrowserStack Automate.................................................................................................................................................6 Setting your operating system, browser, and screen resolution.....................................................................................7 Run tests on mobile browsers........................................................................................................................................7 Screenshots .................................................................................................................................................................11 Responsive ..................................................................................................................................................................11 Conclusion ...................................................................................................................................................................12
  • 3. Cross browser testing using BrowserStack © RapidValue Solutions 3 Introduction BrowserStack is a cross-browser testing tool which allows users to test websites in 700+ desktop and mobile browsers. BrowserStack offers virtualization for:  Windows XP, 7 and 8  OSX Snow Leopard, Lion and Mountain Lion  iOS  Android  Opera Mobile Depending on the operating system you choose, BrowserStack offers a number of supported browsers for the specific OS.
  • 4. Cross browser testing using BrowserStack © RapidValue Solutions 4 How does it work? Browser stack follows a „pay as service‟ model and the pricing is reasonable. The registered users can sign and will be allowed to access the dashboard, which offers a quick start dialogue. This allows you to, easily, enter the URL, you'd like to test via the dropdowns, the target OS and browser version. You can fine tune things via the left panel which offers screen resolution choices and page rendering speed simulation. Clicking “start” commences the process of establishing the connection, via Flash, to the remote server and rendering the virtualized browser. You have full access to the web page's functionality including menus, buttons, and so on. This also, includes the developer tools that come with browsers. You have access to tools like Firefox Web Developer Tools, the IE F12 Tools and the Chrome Developer Tools.
  • 5. Cross browser testing using BrowserStack © RapidValue Solutions 5 So, not only can you see how your pages will render across browsers but you can also, use the existing tools to debug common issues. BrowserStack Live The main area allows you to specify a public address or even use it to test internal applications on your network. The dropdown menus on the upper left of the page allows you to choose the operating system and browser. The dropdown menus on the upper left of the page allow you to choose the operating system and browser.
  • 6. Cross browser testing using BrowserStack © RapidValue Solutions 6 BrowserStack Automate BrowserStack Automate provides a platform to run automated browser tests using, either, the Selenium or JavaScript testing framework. Tests can be customized, using capabilities, which are a series of key- value pairs used to pass values to the tests. Selenium has a set of default capabilities, whereas BrowserStack has created specific capabilities to increase the customization available to users. BrowserStack supports various languages like Python, Ruby, Java, Perl, C# and Node js. Automate test scripts in Java: Running your Selenium tests on BrowserStack requires a username and an access key. To obtain your username and access keys, sign up for a „free trial‟ or „purchase‟ a plan. BrowserStack supports Selenium automated tests, and running your tests on our cloud setup is simple and straightforward. //Download java driver bindings from http://www.seleniumhq.org/download/ Configuring Capabilities To run on BrowserStack, the Selenium capabilities have to be changed. In this example, the browser is Firefox. WebDriver driver = new RemoteWebDriver(
  • 7. Cross browser testing using BrowserStack © RapidValue Solutions 7 new URL("http://USERNAME:ACCESS_KEY@hub.browserstack.com/wd/hub"), DesiredCapabilities.firefox() ); Setting your operating system, browser, and screen resolution You can run your Selenium test scripts on any browser by specifying the browser name, version and resolution in the input capabilities. Parameter override rules: When specifying both default and BrowserStack-specific capabilities, the following rules define any overrides that take place:  If browser and browserName, both, are defined, browser has precedence (except if browserName is Android, iPhone, or iPad, in which cases browser is ignored and the default browser on those devices is selected).  If browser_version and version, both, are defined, browser_version has precedence.  If OS and platform, both, are defined, OS has precedence.  Platform and os_version cannot be defined together, if os has not been defined  os_version can, only, be defined when OS has been defined.  The value ANY, if given to any parameter, is same, as the parameter preference is not specified.  Default browser is chrome, when no browser is passed by the user or the selenium API (implicitly). The following example has Firefox selected as browser, 35.0 as browser version and 1024x768 as resolution. caps.setCapability("browser", "Firefox"); caps.setCapability("browser_version", "35.0"); caps.setCapability("os", "Windows"); caps.setCapability("os_version", "7"); caps.setCapability("resolution", "1024x768"); Run tests on mobile browsers You can run your Selenium test scripts on iOS and Android devices by specifying the version and device in the input capabilities. These capabilities are browserName and device. The following example has iPhone selected as the browserName, and iPhone 5 as the device. DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("browserName", "iPhone");
  • 8. Cross browser testing using BrowserStack © RapidValue Solutions 8 caps.setPlatform(Platform.MAC); caps.setCapability("device", "iPhone 5"); Example: Sending an Email with Gmail package com.rvs.automation; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.List; import org.apache.commons.io.FileUtils; import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class SendMail{ WebDriverWait wait; RemoteWebDriver driver; public static final String USERNAME = "geethuca2"; public static final String AUTOMATE_KEY = "9Cqqo4xnu497CS3YTUXE"; public static final String URL = "http://" + USERNAME + ":" + AUTOMATE_KEY + "@hub.browserstack.com/wd/hub";
  • 9. Cross browser testing using BrowserStack © RapidValue Solutions 9 @BeforeTest public void setUp() throws MalformedURLException { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("browser", "Firefox"); caps.setCapability("browser_version", "35.0"); caps.setCapability("os", "Windows"); caps.setCapability("os_version", "7"); caps.setCapability("resolution", "1024x768"); caps.setCapability("browserstack.debug", "true"); driver = new RemoteWebDriver(new URL(URL), caps); driver.navigate().to("http://www.gmail.com"); System.out.println(driver.getTitle()); wait=new WebDriverWait(driver, 10); } @Test public void gudlyWebTest() throws InterruptedException, IOException { sendEmail(); } Public void sendEmail()throws InterruptedException { //getting email textbox WebElement Username= driver.findElement(By.xpath("//input[@id='Email']")); Username.sendKeys("rvs4test@gmail.com "); //getting password textbox WebElement Password= driver.findElement(By.xpath("//input[@id='Passwd']")); Password.sendKeys("Rapid123");
  • 10. Cross browser testing using BrowserStack © RapidValue Solutions 10 //clicking signin button WebElement signin= driver.findElement(By.xpath("//input[@id='signIn']")); signin.click(); System.out.println("your logging in"); //clicking compose button WebElement compose= driver.findElement(By.xpath("//div[@class='T-I J-J5-Ji T-I-KE L3']")); compose.click(); System.out.println("Loading Composer"); //entering „to‟ address field WebElement toAddress= driver.findElement(By.name("to")); toAddress.sendKeys("sparkqatest@gmail.com"); //entering subject of mail WebElement subject = driver.findElement(By.name("subjectbox")); subject.sendKeys("Automated email"); //switch to frame driver.switchTo().frame(driver.findElement(By.xpath("//iframe[contains(@tabindex,'1') and contains(@frameborder,'0')]"))); //entering text into email body driver.findElement(By.xpath("//*[@id=':ak']")).sendKeys("Hi" +"n"+ " Sending an automated mail "); //switching back from frame driver.switchTo().defaultContent(); //clicking send button driver.findElement(By.xpath("//div[text()='Send']")).click(); driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS); System.out.println("Sending email"); } } }
  • 11. Cross browser testing using BrowserStack © RapidValue Solutions 11 @AfterTest public void terminatetest() { driver.quit(); } } Screenshots Screenshots are used to conduct rapid layout testing of websites. It can instantly generate screenshots of a website across a range of 650+ browsers, by selecting 25 browsers at a time. The screenshots can, then, be downloaded for comparison and future reference. BrowserStack also provides API access for headless creation of screenshots over a selection of operating systems and browsers. Screenshots has two third-party tools: ScreenShooter and Python API wrapper. Responsive Responsive is a feature used to test the responsiveness of website layouts and designs. Responsive comes bundled with screenshots, and it operates in a similar way. It can generate screenshots over a range of screen sizes, where the screen sizes are true to the devices, and have the actual resolutions and viewports set. BrowserStack provides the following devices in Responsive: Device Resolution Size Viewport iPhone 5S 640x1136 4 320x568 Galaxy S5 Mini 720x1280 4.5 360x640 Galaxy S5 1080x1920 5.1 360x640 Note 3 1080x1920 5.7 360x640 iPhone 6 750x1334 4.7 375x667 Nexus 4 738x1280 4.7 384x640 iPhone 6 Plus 1080x1920 5.5 414x736 Kindle Fire HDX 7 1200x1920 7 600x960 iPad Mini 2 1536 x 2048 7.9 768 x 1024 iPad Air 1536x2048 9.7 768 x 1024 Galaxy Tab 2 800x1280 10.1 800x1280 Windows 7 1280x1024 N/A 1280x1024 OS X Yosemite 1920x1080 N/A 1920x1080
  • 12. Cross browser testing using BrowserStack © RapidValue Solutions 12 Conclusion You can create URLs with the testing options as parameters. This helps you to, instantly, start a browser on BrowserStack. You can integrate these URLs into your application, bookmark them and also, share them with others. Local testing allows you to test your private and internal servers, along with public URLs, using the BrowserStack Cloud. The BrowserStack Cloud has support for firewalls, proxies and Active Directory.
  • 13. Cross browser testing using BrowserStack © RapidValue Solutions 13 About US RapidValue is a leading provider of end-to-end mobility, omnichannel and cloud solutions to enterprises worldwide. Armed with a large team of experts in consulting and application development, along with experience delivering global projects, we offer a range of mobility and cloud services across industry verticals. RapidValue delivers its services to the world‟s top brands and Fortune 1000 companies, and has offices in the United States and India. Disclaimer: This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful. © RapidValue Solutions www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com +1 877.643.1850 contactus@rapidvaluesolutions.com