SlideShare a Scribd company logo
How to Break Your App
With Playwright Tests
1
What we will talk about today.
● What is cbPlaywright
● How to get cbPlaywright working on a Coldbox
and none Coldbox apps
● How to use cbPlaywrights basic features
● How to use some of cbPlaywrights more
advanced features
2
Who am I?
3
● Part time student at BC working toward a BS
in Industrial automation
● Favorite thing to do is go on Mission trips
● Learned basic C++ on YouTube
● Got hired to work for Scott at UTS
What is Playwright?
Playwright is a Java library made by Microsoft.
cbPlaywright is a ColdFusion wrapper for this Java library.
We can use it to do end-to-end testing!
4

Recommended for you

Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017

This document discusses continuous delivery in an open source project. It begins with an introduction of the speaker and then discusses various tools used in the continuous delivery process like Travis CI for continuous integration. It outlines the build pipeline for the project including deploying to Bintray and updating GitHub pages. It also covers code quality tools like Codecov and promoting the project on the internet through blogs, conferences and other forums.

javaiceboaropen source
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...

Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w projekcie Open Source - Marcin Stachniuk JUG Łódź

ossopensourcesoftwarecontinuousdelivery
How to write Testable Javascript
How to write Testable JavascriptHow to write Testable Javascript
How to write Testable Javascript

Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript. That's great, but how do we test it? In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet). So how do I write unit tests, what units are there, and how do I make my code look like that? JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable. Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.

devobjective2016
Why not just use the Java library
Because it’s harder and I’m lazy
5
So what is end-to-end testing?
Normal Testing
End-to-end testing
6
Setting up cbPlaywright
Run the following in CommandBox
● install testbox
● install cbplaywright
7
Setting up cbPlaywright
Add the following to tests/Application.cfc
this.mappings[ "/cbPlaywright" ] = rootPath & "/modules/cbPlaywright";
this.javaSettings = {
loadPaths: directoryList(
rootPath & "modules/cbPlaywright/lib"
,
True,
"Array",
"*jar"
),
loadColdFusionClassPath
: true,
reloadOnChange: false
};
8

Recommended for you

How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016

Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript. That's great, but how do we test it? In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet). So how do I write unit tests, what units are there, and how do I make my code look like that? JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable. Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.

chaitddjs
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud

The document outlines 15 ways to optimize Spring Boot applications for the cloud. It recommends using services provided by cloud platforms for monitoring, Spring Cloud Sleuth for request tracing, Spring Boot Actuator for metrics and health checks, and circuit breakers to prevent failures from cascading. It also suggests keeping dependencies up-to-date, using Eclipse OpenJ9 to reduce memory usage, enabling zero-downtime configuration changes, and introducing chaos testing into production environments.

spring bootjavaspring framework
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...

As a Front End Web Developer, experimenting with new tools to add to your workflow (and going down the rabbit hole with them!) is all part and parcel of refining your craft. Chris Eccles, Technical Manager at Building Blocks has been doing just this and has some invaluable insight into CSS Visual Regression using Backstop.JS. CSS Visual Regression testing is the process of running automated visual test comparisons on pages or elements in your projects. Using Backstop.JS, Chris has discovered that this tool is intuitive, allowing quick configuration to allow you to get up and rolling quickly. Backstop.JS serves your tests via a webpage which gives you the visual feedback needed for targeting bugs caused from CSS related issues. These comparisons can uncover bugs you’d otherwise not learn about until it’s too late. A very useful tool to have in your Front End arsenal, wouldn’t you agree? Chris has been sharing his insights with the BB team and wanted to share with our blog readers also. So, sit back and enjoy the ride through the wonderful world of Backstop.JS.

web developmentbackstop.jsvisual regression testing
Setting up cbPlaywright
Run the following in CommandBox
● playwright-cli
● playwright install {{browser}}
Browsers that can be installed are:
chromium, firefox, webkit, msedge
9
Setting up cbPlaywright
Explicitly set the port
10
If cbPlaywright is not running
You may get this error on newer Macs:
bad CPU type in executable: node
To fix this run the following command:
softwareupdate --install-rosetta
11
Making a cbPlaywright test
component extends="cbPlaywright.models.
ColdBoxPlaywrightTestCase" {
function run() {
describe( "Description", () => {
it( "can do something", () => {
Tests go here!
}
}
}
}
Go to tests/specs/integration and create a cfc
12

Recommended for you

Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED

Andi Smith provides an overview of setting up an automated workflow for front-end development using Grunt or Gulp. They discuss choosing a task runner, common tasks for setup like concatenation and minification, tasks for development like autoprefixing and live reloading, and tasks for build like image optimization and compression. The presentation emphasizes setting up a workflow that focuses on speeding up the development process and only including necessary tasks.

gulpjsgulpgruntjs
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud

The document outlines 17 ways to optimize Spring Boot applications for the cloud. Some of the key recommendations include using services provided by cloud platforms for monitoring and tracing requests. It also recommends using circuit breakers to prevent failures from cascading, keeping dependencies up-to-date, and enabling class sharing with Eclipse OpenJ9 to reduce memory usage. Continuous delivery pipelines and configuration management are also suggested for deploying changes with zero downtime.

How to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud SolutionsHow to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud Solutions

A quick walkthrough for those of you looking for more details on Selenium Grid and how to work with cloud-based solutions…

seleniumcloud solutions
Creating a browser, context, and page
Browser
Context
Page
var browser = launchInteractiveBrowser
(variables.playwright.chromium());
var context = browser.newContext();
var page = context.newPage();
var browser = launchBrowser(variables.playwright.chromium());
//This method is a shortcut for creating a browser and a context.
var page = browser.newPage();
13
Navigating
navigate( page, "#variables.baseUrl#/auth/index" );
waitForLoadState( page );
14
Now that cbPlaywright is on the page
Their is three main things we will be doing
● Selecting elements
● Interacting with elements
● Getting the value from elements
15
Some of the methods for selecting are…
page.getByAltText("AltText")
page.getByLabel("Label")
page.getByPlaceholder("Placeholder")
page.getByText("Text")
page.getByTitle("Title")
page.getByTestId("TestID")
locateElement(page, "input[name=username]"
)
getByRole(page, "link", {name: "Hello"})
page.title()
.first()
.last()
.nth(3)//zero indexed
16
<div data-testid="TestID">Text</div>

Recommended for you

Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later

Airware's cloud automation team returns with a year’s worth of lessons learned, and will share the challenges involved with building a full-stack test automation framework with Node.js while using the latest and greatest in JavaScript tools. Topics Async / Await - an alternative to Webdriver’s built-in control flow. Limitations with control flow. Use Babel to write the latest ES6 JavaScript syntax. Custom reporter with screenshots from Sauce Labs. Parallel tests and accurate reporting. Type-safe JavaScript with Facebook’s Flow-type library. Robust visual diffs

software testingnodejsnode.js
Eclipse cq5 configuration
Eclipse cq5 configurationEclipse cq5 configuration
Eclipse cq5 configuration

This document provides a step-by-step procedure to configure CRX DE Lite to your Eclipse workspace. It details the 7 steps to: 1) install the AEM Developer Tools plugin, 2) configure a Sling server and import projects from source control, 3) build projects with Maven, 4) add projects to the Sling server, 5) convert existing projects to Sling bundles and content projects, 6) initiate content syncing from CRX, and 7) debug by starting the CQ instance and Sling server in debug mode.

Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...

Recorded at the London Microservices Meetup: https://www.meetup.com/London-Microservices/ - Date: 05/08/2020 - Event page: https://www.meetup.com/London-Microservices/events/272223163/ Follow us on Twitter! https://twitter.com/LondonMicrosvc --- Services interpreted at runtime often suffer from slow startup times when components are intitialized at runtime. Ahead of time compilation allows condensing down an application by stripping down unused dependencies and pre-initializing components for a short time to first request served. This is explored by the example of GraalVM and native images. Key takeaways: - Be aware what your service contains - Approaches to improve startup time of a service - Reduction of resource requirements for a service Tobias works at Loveholidays.com as a senior software engineer extending it's microservice architecture and turning it more event-driven.

microservicesleandistributed-systems
Some of the methods for interacting are…
element.fill("Fill Text")
element.selectOption("Option")
element.click()
element.dblclick()
element.press("ArrowLeft")
element.setChecked(true)
17
Some of the methods for Getting values are…
element.innerText()
element.inputValue()
element.isChecked()
element.isVisible()
expect(page.getByTestId("title").innerText()).toBe("Hello World!" );
expect(page.getByTestId("random_shmamdom" ).isVisible()).toBeTrue();
18
Other useful cbPlaywright methods
page.waitForTimeout(1000);
page.waitForLoadState();
page.waitForFunction( "() => app.totalRows == 1" );
Waits
navigate( page, "#variables.baseUrl#/auth/index" );
page.reload();
Navigate
19
Fancy features
● Taking screenshots
● Recording video
● Tracing a context
20

Recommended for you

Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insight

Operators are automated software managers for Kubernetes applications that extend the Kubernetes API to create, configure, and manage instances of complex stateful applications on behalf of a Kubernetes user. The Operator Framework is used to build operators which reconcile the desired state specified in a Custom Resource with the actual state of the cluster. Operators can be built using the Operator SDK and can leverage different runtimes like Go, Ansible, or Helm. Once installed, end users can create operator-managed resources like Postgres in their own namespaces through the Kubernetes API.

openshift operatorkubernetes operatorpaas
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests

Learn why you should put your blackbox (or system/integration) tests into Docker Containers. Brief (remedial) overview of Docker for software testers who don't know docker, and only need to know the basics to wrap their regression tests inside of a container.

Spark summit2014 techtalk - testing spark
Spark summit2014 techtalk - testing sparkSpark summit2014 techtalk - testing spark
Spark summit2014 techtalk - testing spark

The document discusses best practices for testing Spark applications including setting up test environments for unit and integration testing Spark in both batch and streaming modes. It also covers performance testing Spark applications using Gatling, including developing a sample performance test for a word count Spark job run on Spark job server. Key steps for testing, code coverage, continuous integration and analyzing performance test results are provided.

testingapache sparktest
Taking a screenshot
screenshotPage(page, "/tests/specs/screenshots/name.png"
);
21
Recording a context
newRecordedContextForBrowser (
browser, "/tests/specs/recordings ", function(context){
});
22
Tracing a context
traceContext(context, "/tests/specs/traces/name.zip"
, function(){
});
23
Convinced?
24

Recommended for you

Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...

Annotated slides for phpCE workshop on November 3, 2017. Workshop repository: https://github.com/OndraM/selenium-workshop-phpce The workshop covered: - setting up local development environment (using Docker) - practical examples of functional tests implementation - exploring possibilities of Selenium WebDriver - parallel test execution using Steward - hands-on Page Object design pattern - dealing with asynchronous elements of web-pages (AJAX, JavaScript) - general tips & tricks how to keep a maintainable suite of functional tests in a long-term

phpphpunitselenium
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by DefaultJS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default

Angular grew significantly in the past few years from both a tooling and developer experience standpoint. This talk will explore many of the features and newer improvements in the pipeline that allow anyone to build and deploy performant apps with very little overhead. Through real demos and examples, we’ll cover Ivy, bundle budgeting, differential serving, automatic code-splitting, and progressive rehydration of SSR elements. In the second part of the talk, we’ll focus on how to efficiently prefetch and preload different modules and components.

#frameworks#jfest#jsfestua
Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI

Sami provided a beginner-friendly introduction to Amazon Web Services (AWS), covering essential terms, products, and services for cloud deployment. Participants explored AWS' latest Gen AI offerings, making it accessible for those starting their cloud journey or integrating AI into coding practices.

cfmlcoldfusionboxlang
Questions?
25
Thank You!
26

More Related Content

Similar to How to Break Your App with Playwright Tests

Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Matt Raible
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
Applitools
 
Autotests introduction - Codeception + PHP Basics
Autotests introduction - Codeception + PHP BasicsAutotests introduction - Codeception + PHP Basics
Autotests introduction - Codeception + PHP Basics
Artur Babyuk
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
MarcinStachniuk
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
MarcinStachniuk
 
How to write Testable Javascript
How to write Testable JavascriptHow to write Testable Javascript
How to write Testable Javascript
ColdFusionConference
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
Gavin Pickin
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
Billy Korando
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Building Blocks
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED
Andi Smith
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
PolyglotMeetups
 
How to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud SolutionsHow to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud Solutions
Noam Zakai
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later
Mek Srunyu Stittri
 
Eclipse cq5 configuration
Eclipse cq5 configurationEclipse cq5 configuration
Eclipse cq5 configuration
Indrasena Reddy
 
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
London Microservices
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insight
Ryan ZhangCheng
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests
Kevin Beeman
 
Spark summit2014 techtalk - testing spark
Spark summit2014 techtalk - testing sparkSpark summit2014 techtalk - testing spark
Spark summit2014 techtalk - testing spark
Anu Shetty
 
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Ondřej Machulda
 
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by DefaultJS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JSFestUA
 

Similar to How to Break Your App with Playwright Tests (20)

Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
 
Autotests introduction - Codeception + PHP Basics
Autotests introduction - Codeception + PHP BasicsAutotests introduction - Codeception + PHP Basics
Autotests introduction - Codeception + PHP Basics
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
 
How to write Testable Javascript
How to write Testable JavascriptHow to write Testable Javascript
How to write Testable Javascript
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
 
How to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud SolutionsHow to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud Solutions
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later
 
Eclipse cq5 configuration
Eclipse cq5 configurationEclipse cq5 configuration
Eclipse cq5 configuration
 
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insight
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests
 
Spark summit2014 techtalk - testing spark
Spark summit2014 techtalk - testing sparkSpark summit2014 techtalk - testing spark
Spark summit2014 techtalk - testing spark
 
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
 
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by DefaultJS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
 

More from Ortus Solutions, Corp

Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
Ortus Solutions, Corp
 
How we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hoursHow we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hours
Ortus Solutions, Corp
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
Ortus Solutions, Corp
 
BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
Ortus Solutions, Corp
 
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
Ortus Solutions, Corp
 
Web Hosting with CommandBox and CommandBox Pro
Web Hosting with CommandBox and CommandBox ProWeb Hosting with CommandBox and CommandBox Pro
Web Hosting with CommandBox and CommandBox Pro
Ortus Solutions, Corp
 
Revolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBoxRevolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBox
Ortus Solutions, Corp
 
Disk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFSDisk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFS
Ortus Solutions, Corp
 
Securing Your Application with Passkeys and cbSecurity
Securing Your Application with Passkeys and cbSecuritySecuring Your Application with Passkeys and cbSecurity
Securing Your Application with Passkeys and cbSecurity
Ortus Solutions, Corp
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
Ortus Solutions, Corp
 
Design system: The basis for a consistent design
Design system: The basis for a consistent designDesign system: The basis for a consistent design
Design system: The basis for a consistent design
Ortus Solutions, Corp
 
ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...
ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...
ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...
Ortus Solutions, Corp
 
How to Make a Living as a (ColdFusion) Freelancer?
How to Make a Living as a (ColdFusion) Freelancer?How to Make a Living as a (ColdFusion) Freelancer?
How to Make a Living as a (ColdFusion) Freelancer?
Ortus Solutions, Corp
 
What’s New in ContentBox 6 by Ortus Solutions.pdf
What’s New in ContentBox 6 by Ortus Solutions.pdfWhat’s New in ContentBox 6 by Ortus Solutions.pdf
What’s New in ContentBox 6 by Ortus Solutions.pdf
Ortus Solutions, Corp
 
cbq - Jobs and Tasks in the Background by Ortus
cbq - Jobs and Tasks in the Background by Ortuscbq - Jobs and Tasks in the Background by Ortus
cbq - Jobs and Tasks in the Background by Ortus
Ortus Solutions, Corp
 
Demonstrating Monitoring Solutions for CF and Lucee
Demonstrating Monitoring Solutions for CF and LuceeDemonstrating Monitoring Solutions for CF and Lucee
Demonstrating Monitoring Solutions for CF and Lucee
Ortus Solutions, Corp
 
Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!
Ortus Solutions, Corp
 
Build a Complex Web Form with RuleBox and TestBox
Build a Complex Web Form with RuleBox and TestBoxBuild a Complex Web Form with RuleBox and TestBox
Build a Complex Web Form with RuleBox and TestBox
Ortus Solutions, Corp
 
Reactive CFML with CBWIRE v4 by Ortus Solutions
Reactive CFML with CBWIRE v4 by Ortus SolutionsReactive CFML with CBWIRE v4 by Ortus Solutions
Reactive CFML with CBWIRE v4 by Ortus Solutions
Ortus Solutions, Corp
 
Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...
Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...
Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...
Ortus Solutions, Corp
 

More from Ortus Solutions, Corp (20)

Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
 
How we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hoursHow we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hours
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
 
BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
 
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
 
Web Hosting with CommandBox and CommandBox Pro
Web Hosting with CommandBox and CommandBox ProWeb Hosting with CommandBox and CommandBox Pro
Web Hosting with CommandBox and CommandBox Pro
 
Revolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBoxRevolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBox
 
Disk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFSDisk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFS
 
Securing Your Application with Passkeys and cbSecurity
Securing Your Application with Passkeys and cbSecuritySecuring Your Application with Passkeys and cbSecurity
Securing Your Application with Passkeys and cbSecurity
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
 
Design system: The basis for a consistent design
Design system: The basis for a consistent designDesign system: The basis for a consistent design
Design system: The basis for a consistent design
 
ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...
ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...
ColdBox Debugger v4.2.0: Unveiling Advanced Debugging Techniques for ColdBox ...
 
How to Make a Living as a (ColdFusion) Freelancer?
How to Make a Living as a (ColdFusion) Freelancer?How to Make a Living as a (ColdFusion) Freelancer?
How to Make a Living as a (ColdFusion) Freelancer?
 
What’s New in ContentBox 6 by Ortus Solutions.pdf
What’s New in ContentBox 6 by Ortus Solutions.pdfWhat’s New in ContentBox 6 by Ortus Solutions.pdf
What’s New in ContentBox 6 by Ortus Solutions.pdf
 
cbq - Jobs and Tasks in the Background by Ortus
cbq - Jobs and Tasks in the Background by Ortuscbq - Jobs and Tasks in the Background by Ortus
cbq - Jobs and Tasks in the Background by Ortus
 
Demonstrating Monitoring Solutions for CF and Lucee
Demonstrating Monitoring Solutions for CF and LuceeDemonstrating Monitoring Solutions for CF and Lucee
Demonstrating Monitoring Solutions for CF and Lucee
 
Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!
 
Build a Complex Web Form with RuleBox and TestBox
Build a Complex Web Form with RuleBox and TestBoxBuild a Complex Web Form with RuleBox and TestBox
Build a Complex Web Form with RuleBox and TestBox
 
Reactive CFML with CBWIRE v4 by Ortus Solutions
Reactive CFML with CBWIRE v4 by Ortus SolutionsReactive CFML with CBWIRE v4 by Ortus Solutions
Reactive CFML with CBWIRE v4 by Ortus Solutions
 
Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...
Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...
Building Scaleable Serverless Event-Driven Computing with AWS Lambda powered ...
 

Recently uploaded

Attendance Tracking From Paper To Digital
Attendance Tracking From Paper To DigitalAttendance Tracking From Paper To Digital
Attendance Tracking From Paper To Digital
Task Tracker
 
WEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service ProvidersWEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service Providers
Severalnines
 
What is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for FreeWhat is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for Free
TwisterTools
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdfAWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
karim wahed
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
DNUG e.V.
 
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
Roshan Dwivedi
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
sheqnetworkmarketing
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
SSTech System
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Softwares
 
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
avufu
 
A Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdfA Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdf
kalichargn70th171
 
Overview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptxOverview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptx
Mitchell Marsh
 
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfResponsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Trackobit
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
sachin chaurasia
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
karim wahed
 
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
bhatinidhi2001
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
908dutch
 
ANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdfANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdf
sachin chaurasia
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Sparity1
 

Recently uploaded (20)

Attendance Tracking From Paper To Digital
Attendance Tracking From Paper To DigitalAttendance Tracking From Paper To Digital
Attendance Tracking From Paper To Digital
 
WEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service ProvidersWEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service Providers
 
What is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for FreeWhat is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for Free
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdfAWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
 
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
 
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
 
A Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdfA Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdf
 
Overview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptxOverview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptx
 
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfResponsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
 
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
 
ANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdfANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdf
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
 

How to Break Your App with Playwright Tests

  • 1. How to Break Your App With Playwright Tests 1
  • 2. What we will talk about today. ● What is cbPlaywright ● How to get cbPlaywright working on a Coldbox and none Coldbox apps ● How to use cbPlaywrights basic features ● How to use some of cbPlaywrights more advanced features 2
  • 3. Who am I? 3 ● Part time student at BC working toward a BS in Industrial automation ● Favorite thing to do is go on Mission trips ● Learned basic C++ on YouTube ● Got hired to work for Scott at UTS
  • 4. What is Playwright? Playwright is a Java library made by Microsoft. cbPlaywright is a ColdFusion wrapper for this Java library. We can use it to do end-to-end testing! 4
  • 5. Why not just use the Java library Because it’s harder and I’m lazy 5
  • 6. So what is end-to-end testing? Normal Testing End-to-end testing 6
  • 7. Setting up cbPlaywright Run the following in CommandBox ● install testbox ● install cbplaywright 7
  • 8. Setting up cbPlaywright Add the following to tests/Application.cfc this.mappings[ "/cbPlaywright" ] = rootPath & "/modules/cbPlaywright"; this.javaSettings = { loadPaths: directoryList( rootPath & "modules/cbPlaywright/lib" , True, "Array", "*jar" ), loadColdFusionClassPath : true, reloadOnChange: false }; 8
  • 9. Setting up cbPlaywright Run the following in CommandBox ● playwright-cli ● playwright install {{browser}} Browsers that can be installed are: chromium, firefox, webkit, msedge 9
  • 11. If cbPlaywright is not running You may get this error on newer Macs: bad CPU type in executable: node To fix this run the following command: softwareupdate --install-rosetta 11
  • 12. Making a cbPlaywright test component extends="cbPlaywright.models. ColdBoxPlaywrightTestCase" { function run() { describe( "Description", () => { it( "can do something", () => { Tests go here! } } } } Go to tests/specs/integration and create a cfc 12
  • 13. Creating a browser, context, and page Browser Context Page var browser = launchInteractiveBrowser (variables.playwright.chromium()); var context = browser.newContext(); var page = context.newPage(); var browser = launchBrowser(variables.playwright.chromium()); //This method is a shortcut for creating a browser and a context. var page = browser.newPage(); 13
  • 15. Now that cbPlaywright is on the page Their is three main things we will be doing ● Selecting elements ● Interacting with elements ● Getting the value from elements 15
  • 16. Some of the methods for selecting are… page.getByAltText("AltText") page.getByLabel("Label") page.getByPlaceholder("Placeholder") page.getByText("Text") page.getByTitle("Title") page.getByTestId("TestID") locateElement(page, "input[name=username]" ) getByRole(page, "link", {name: "Hello"}) page.title() .first() .last() .nth(3)//zero indexed 16 <div data-testid="TestID">Text</div>
  • 17. Some of the methods for interacting are… element.fill("Fill Text") element.selectOption("Option") element.click() element.dblclick() element.press("ArrowLeft") element.setChecked(true) 17
  • 18. Some of the methods for Getting values are… element.innerText() element.inputValue() element.isChecked() element.isVisible() expect(page.getByTestId("title").innerText()).toBe("Hello World!" ); expect(page.getByTestId("random_shmamdom" ).isVisible()).toBeTrue(); 18
  • 19. Other useful cbPlaywright methods page.waitForTimeout(1000); page.waitForLoadState(); page.waitForFunction( "() => app.totalRows == 1" ); Waits navigate( page, "#variables.baseUrl#/auth/index" ); page.reload(); Navigate 19
  • 20. Fancy features ● Taking screenshots ● Recording video ● Tracing a context 20
  • 21. Taking a screenshot screenshotPage(page, "/tests/specs/screenshots/name.png" ); 21
  • 22. Recording a context newRecordedContextForBrowser ( browser, "/tests/specs/recordings ", function(context){ }); 22
  • 23. Tracing a context traceContext(context, "/tests/specs/traces/name.zip" , function(){ }); 23