This document discusses using Geb, an open source browser automation framework, for web testing. Geb leverages WebDriver for cross-browser automation capabilities, jQuery for content selection, and Groovy for its expressiveness. Geb promotes best practices like page object modelling and BDD. It provides a navigation API and content DSL to select page elements in a clean way. Geb also supports configuration management and integration with popular testing frameworks like Spock, JUnit, and TestNG.
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect ModelvodQA
Learn how to design, create, maintain, and re-factor an automation framework using the power of WebDriver, the elegance of jQuery content selection, the robustness of Page Object modeling, and the expressiveness of the Groovy language. Gaurav introduces an open-source testing solution that provides all this, and can be integrated with testing frameworks such as Spock, JUnit & TestNG.
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect ModelvodQA
Learn how to design, create, maintain, and re-factor an automation framework using the power of WebDriver, the elegance of jQuery content selection, the robustness of Page Object modeling, and the expressiveness of the Groovy language. Gaurav introduces an open-source testing solution that provides all this, and can be integrated with testing frameworks such as Spock, JUnit & TestNG.
This is an effort towards teaching Angular JS from what an average Javascript developer already know. The presentation tries to fill the gap rather than posing Angular as a magical framework.
HTML5 contains many new interesting features that make the platform a capaple development platform. Sockets, SVG, geolocation, local storage and many more are included in the platform. In this one hour session, we will look at cool implementations of 10 features of HTML5
Suggest.js (suggestion engine) is robust, flexible, and offers advanced functionalities such as:
Fast lookups (Autocomplete)
Related Concepts
AutoCorrect
Recent Searches / Search history
Prefetching (Powered by localStorage)
Data merging
Intelligent caching(URL caching)
Personalised Search (Recent Search/User Based)
Service Oriented Architecture -Unit II - Modeling databases in xml Roselin Mary S
Modeling databases in xml
Steps:
1. Review the database schema.
2. Construct the desired XML document.
3. Define a schema for the XML document.
4. Create the JAXB binding schema.
5. Generate the JAXB classes based on the schema.
6. Develop a Data Access Object (DAO).
7. Develop a servlet for HTTP access.
Anatomy of a web app
HTML5
CSS3
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Happiness Workshop IV: The Importance of Relationshipsmichael_mascolo
Part of cultivating happiness is the development of meaningful interpersonal relationships. This presentation and workshop explores the ways in which relationships enrich our lives. It examines how can cultivate meaningful relationships that sustain happy lives.
This is an effort towards teaching Angular JS from what an average Javascript developer already know. The presentation tries to fill the gap rather than posing Angular as a magical framework.
HTML5 contains many new interesting features that make the platform a capaple development platform. Sockets, SVG, geolocation, local storage and many more are included in the platform. In this one hour session, we will look at cool implementations of 10 features of HTML5
Suggest.js (suggestion engine) is robust, flexible, and offers advanced functionalities such as:
Fast lookups (Autocomplete)
Related Concepts
AutoCorrect
Recent Searches / Search history
Prefetching (Powered by localStorage)
Data merging
Intelligent caching(URL caching)
Personalised Search (Recent Search/User Based)
Service Oriented Architecture -Unit II - Modeling databases in xml Roselin Mary S
Modeling databases in xml
Steps:
1. Review the database schema.
2. Construct the desired XML document.
3. Define a schema for the XML document.
4. Create the JAXB binding schema.
5. Generate the JAXB classes based on the schema.
6. Develop a Data Access Object (DAO).
7. Develop a servlet for HTTP access.
Anatomy of a web app
HTML5
CSS3
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Happiness Workshop IV: The Importance of Relationshipsmichael_mascolo
Part of cultivating happiness is the development of meaningful interpersonal relationships. This presentation and workshop explores the ways in which relationships enrich our lives. It examines how can cultivate meaningful relationships that sustain happy lives.
Visualize:Vascular generates focused 3-D rendering from 2-D standard ultrasound images and effectively tracks the true lumen in arterial pathways. Visualize focuses on the lumen and residual lumen by essentially removing the other image content revealing a 3-D rendering of the active area through which the blood can flow. Visualize provides direct luminal measurements to calculate luminal reduction directly from ultrasound imaging.
Inquinamento RIMAR - Trissino, 1979 - CTU tossicologico/analitica Prof. A. Li...Porfirina
Perizia tossicologico/analitica del del Prof. Arnaldo Liberti, allegata alla sentenza del Pretore di Vicenza del 14.4.1979 (n° 416 Reg. Sent. e n° 5387/77 Reg. Gen.), relativa all'inquinamento causato dalla ditta RIMAR di Trissino (VI) a metà anni '70
(cortesia Dr. Francesco Albrizio, Vittorio Veneto)
Vedi:
http://www.slideshare.net/Porfirina/inquinamento-rimar-di-trissino-vicenza-sentenza-14-aprile-1979/Porfirina/inquinamento-rimar-di-trissino-vicenza-sentenza-14-aprile-1979
In service innovation projects complexities abound, both within the boundaries of the organization and outside of them: value chains have become value networks, target customers have contextual and situational preferences in their complex experience journeys, and interactions with the organization involve many channels and touch points. Customer centricity is a prerequisite but it requires various cross sections through the organization to cooperate smoothly.
In his keynote, Erik will discuss the glue that holds these complex processes together. On the basis of case studies from his service design consulting practice, and insights from his teaching at the Delft University of Technology, Erik will dive deeper into how to align various enterprise functions around a shared and actionable vision and towards a coherent and tangible end-result. He will show through analysis of these various cases that a shared, actionable, and congruent enterprise vision is of vital importance for innovation success, and can be steered and managed effectively.
Taming Functional Web Testing with Spock and GebC4Media
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/14tIOTm.
Peter Niederwieser demonstrates how to do functional web testing with Spock and Geb, two testing tools from the Groovy/Java world.Filmed at qconlondon.com.
Peter Niederwieser is a computer language enthusiast from Linz, Austria. Having used Java since 1997, Peter nowadays prefers to work with more flexible languages - in particular Groovy, Scala, and Clojure. Peter is the creator of Spock and a Groovy committer. Twitter: @pniederw
Geb is a browser automation solution.
Geb uses the power of Selenium WebDriver and more.
Geb + Spock API simplifies test automation using Given-When-Then Concept.
[@IndeedEng] Building Indeed Resume Searchindeedeng
Video available: http://youtu.be/qcnP5gQGBaU
Software engineer David Tulig will dive into the architecture of Indeed’s Resume Instant Search and our use of the Google Closure tools. David will explain how we write maintainable, efficient JavaScript components for Resume Instant Search and other Indeed products. He will discuss how we create templates that run on both client and server, providing fast initial page load time and search engine-friendly pages with the responsiveness of client-side rendering.
Speaker:
David Tulig is a software engineer on the Job Search team at Indeed. David has worked on employer, resume, and job search products during his 4 years at Indeed.
Main instruments used for Web UI test automation.
Drivers: Selenium WebDriver, Sikuli X.
Frameworks: PageFactory, TestNG.
Other tools: Apache Ant, Jenkins CI.
Why and when you need end-to-end tests, a spooky story with a 15 years software beast, and how to develop concise, maintainable functional tests using Groovy, Spock and Geb.
Presented at Bucharest Java User Group, http://www.bjug.ro/editii/5.html . Project source code available at: https://github.com/bucharest-jug/dropwizard-todo
This talk was given at "The KISS Method and PageObjects" meetup (https://goo.gl/2DBuxj).
The talk is about KISS (Keep It Simple Stupid) principle applied to PageObjects design with a comparison to other more classic approaches.
The slides contain both Selenium Webdriver and Selenide examples.
src code for the talk: https://github.com/yashaka/talks/tree/master/kiss-pageobjects
Javascript and first-class citizenry: require.js & node.js
Javascript on web pages is ubiquitous and its problems are legendary. Javascript, seen as a second-class code citizen, is usually hacked together even by seasoned developers. New libraries (jQuery, prototype, backbone, knockout, underscore) and runtime tools (firebug, jasmine) look like they solve many problems - and they do. But they still leave poorly written code as just that. One key problem is that all javascript code lives globally and this results in poorly managed, tested and delivered code.
In this session, I will illustrate that we can treat javascript as a first-class citizen using with require.js and node.js: it can be modular, encapsulated and easily unit tested and added to continuous integration cycle. The dependencies between javascript modules can also be managed and packaged just like in C# and Java. In the end, we can resolve many javascript difficulties at compile time rather than waiting until runtime.
Everything is Awesome - Cutting the Corners off the WebJames Rakich
The web is awesome despite it's detractors. But we can't forget our fundamentals when we're trying to forge ahead with new tech. This talk is about how to approach the building blocks of the web in a way that takes advantage of their strengths and avoids their weaknesses.
Integrating React.js Into a PHP ApplicationAndrew Rota
React.js has taken the web development world by storm, and for good reason: React offers a declarative, component-oriented approach to building highly-scalable web UIs. But how can we take advantage of a JavaScript library like React in our server-side PHP applications. In this talk l cover the different ways React.js can be integrated into an existing PHP web application: from a client-side only approach to multiple techniques that support full server-side rendering with a Node.js server or PHP’s v8js. I also discuss the trade-offs in each of these designs and the challenges involved with adding React to a PHP site. Most importantly, I consider the higher-level issue of how to improve view cohesion across the client-server divide in a PHP application.
Slides for a talk I present at SkillsMatter.
http://skillsmatter.com/podcast/agile-testing/acceptance-testing-with-geb
This talk will cover the basics of using Geb http://geb.codehaus.org to automate browser testing.
It will compare Geb with raw WebDriver/Selenium showing Geb's expressive Groovy API.
It will also demonstrate how to integrate Geb with acceptance testing frameworks, namely Cucumber via Cuke4Duke.
We will also cover an experience report on how and why we transitioned from raw WebDriver to Geb and how existing WebDriver projects can be ported across to Geb with minimal initial effort due to its underlying use of WebDriver.
Similar to Agile NCR 2013 - Gaurav Bansal- web_automation (20)
Implicitly or explicitly all competing businesses employ a strategy to select a mix
of marketing resources. Formulating such competitive strategies fundamentally
involves recognizing relationships between elements of the marketing mix (e.g.,
price and product quality), as well as assessing competitive and market conditions
(i.e., industry structure in the language of economics).
Falcon stands out as a top-tier P2P Invoice Discounting platform in India, bridging esteemed blue-chip companies and eager investors. Our goal is to transform the investment landscape in India by establishing a comprehensive destination for borrowers and investors with diverse profiles and needs, all while minimizing risk. What sets Falcon apart is the elimination of intermediaries such as commercial banks and depository institutions, allowing investors to enjoy higher yields.
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...BBPMedia1
Marvin neemt je in deze presentatie mee in de voordelen van non-endemic advertising op retail media netwerken. Hij brengt ook de uitdagingen in beeld die de markt op dit moment heeft op het gebied van retail media voor niet-leveranciers.
Retail media wordt gezien als het nieuwe advertising-medium en ook mediabureaus richten massaal retail media-afdelingen op. Merken die niet in de betreffende winkel liggen staan ook nog niet in de rij om op de retail media netwerken te adverteren. Marvin belicht de uitdagingen die er zijn om echt aansluiting te vinden op die markt van non-endemic advertising.
Premium MEAN Stack Development Solutions for Modern BusinessesSynapseIndia
Stay ahead of the curve with our premium MEAN Stack Development Solutions. Our expert developers utilize MongoDB, Express.js, AngularJS, and Node.js to create modern and responsive web applications. Trust us for cutting-edge solutions that drive your business growth and success.
Know more: https://www.synapseindia.com/technology/mean-stack-development-company.html
Discover the innovative and creative projects that highlight my journey throu...dylandmeas
Discover the innovative and creative projects that highlight my journey through Full Sail University. Below, you’ll find a collection of my work showcasing my skills and expertise in digital marketing, event planning, and media production.
Affordable Stationery Printing Services in Jaipur | Navpack n PrintNavpack & Print
Looking for professional printing services in Jaipur? Navpack n Print offers high-quality and affordable stationery printing for all your business needs. Stand out with custom stationery designs and fast turnaround times. Contact us today for a quote!
B2B payments are rapidly changing. Find out the 5 key questions you need to be asking yourself to be sure you are mastering B2B payments today. Learn more at www.BlueSnap.com.
Kseniya Leshchenko: Shared development support service model as the way to ma...Lviv Startup Club
Kseniya Leshchenko: Shared development support service model as the way to make small projects with small budgets profitable for the company (UA)
Kyiv PMDay 2024 Summer
Website – www.pmday.org
Youtube – https://www.youtube.com/startuplviv
FB – https://www.facebook.com/pmdayconference
"𝑩𝑬𝑮𝑼𝑵 𝑾𝑰𝑻𝑯 𝑻𝑱 𝑰𝑺 𝑯𝑨𝑳𝑭 𝑫𝑶𝑵𝑬"
𝐓𝐉 𝐂𝐨𝐦𝐬 (𝐓𝐉 𝐂𝐨𝐦𝐦𝐮𝐧𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬) is a professional event agency that includes experts in the event-organizing market in Vietnam, Korea, and ASEAN countries. We provide unlimited types of events from Music concerts, Fan meetings, and Culture festivals to Corporate events, Internal company events, Golf tournaments, MICE events, and Exhibitions.
𝐓𝐉 𝐂𝐨𝐦𝐬 provides unlimited package services including such as Event organizing, Event planning, Event production, Manpower, PR marketing, Design 2D/3D, VIP protocols, Interpreter agency, etc.
Sports events - Golf competitions/billiards competitions/company sports events: dynamic and challenging
⭐ 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐝 𝐩𝐫𝐨𝐣𝐞𝐜𝐭𝐬:
➢ 2024 BAEKHYUN [Lonsdaleite] IN HO CHI MINH
➢ SUPER JUNIOR-L.S.S. THE SHOW : Th3ee Guys in HO CHI MINH
➢FreenBecky 1st Fan Meeting in Vietnam
➢CHILDREN ART EXHIBITION 2024: BEYOND BARRIERS
➢ WOW K-Music Festival 2023
➢ Winner [CROSS] Tour in HCM
➢ Super Show 9 in HCM with Super Junior
➢ HCMC - Gyeongsangbuk-do Culture and Tourism Festival
➢ Korean Vietnam Partnership - Fair with LG
➢ Korean President visits Samsung Electronics R&D Center
➢ Vietnam Food Expo with Lotte Wellfood
"𝐄𝐯𝐞𝐫𝐲 𝐞𝐯𝐞𝐧𝐭 𝐢𝐬 𝐚 𝐬𝐭𝐨𝐫𝐲, 𝐚 𝐬𝐩𝐞𝐜𝐢𝐚𝐥 𝐣𝐨𝐮𝐫𝐧𝐞𝐲. 𝐖𝐞 𝐚𝐥𝐰𝐚𝐲𝐬 𝐛𝐞𝐥𝐢𝐞𝐯𝐞 𝐭𝐡𝐚𝐭 𝐬𝐡𝐨𝐫𝐭𝐥𝐲 𝐲𝐨𝐮 𝐰𝐢𝐥𝐥 𝐛𝐞 𝐚 𝐩𝐚𝐫𝐭 𝐨𝐟 𝐨𝐮𝐫 𝐬𝐭𝐨𝐫𝐢𝐞𝐬."
Putting the SPARK into Virtual Training.pptxCynthia Clay
This 60-minute webinar, sponsored by Adobe, was delivered for the Training Mag Network. It explored the five elements of SPARK: Storytelling, Purpose, Action, Relationships, and Kudos. Knowing how to tell a well-structured story is key to building long-term memory. Stating a clear purpose that doesn't take away from the discovery learning process is critical. Ensuring that people move from theory to practical application is imperative. Creating strong social learning is the key to commitment and engagement. Validating and affirming participants' comments is the way to create a positive learning environment.
Company Valuation webinar series - Tuesday, 4 June 2024FelixPerez547899
This session provided an update as to the latest valuation data in the UK and then delved into a discussion on the upcoming election and the impacts on valuation. We finished, as always with a Q&A
At Techbox Square, in Singapore, we're not just creative web designers and developers, we're the driving force behind your brand identity. Contact us today.
1. Ultimate Web Automation using WebDriver,
Groovy, JQuery and Domain Modelling
It is just not all about Selenium
Gaurav Bansal
Principal Consultant, Xebia
Phone: +91-989-984-9992
E-mail: gbansal@xebia.com
2. Challenges…
More Deliverables
Fewer resources
In less time
With high quality
Finding Tool
Cost effective approaches
Integrated Framework
3. Web Automation Challenges..
Challenges Solution (Theory)
Multiple Browsers, Multiple Versions Native to Web Browsers
Powerful Element Querying
Complex Web Elements Capabilities
Coupling of Env. in scripts Configuration Management
Duplicate/Unreadable/Non-
Maintainable Code Domain Modelling
Results - Required Statistics,
Screenshot etc Good Reporting
Boilerplate Code DSL
Test Representation Problem BDD
4. Web Automation Solution..
Solution (Theory) Solution (Practical)
Native to Web Browsers
Powerful Element Querying
Capabilities
Configuration Management GEB
Domain Modelling Geb’s Page Class
Good Reporting Geb
Geb’s Browser
DSL Class
BDD Spock
5. What is Geb?
Geb is a browser automation solution.
It brings together the…
Cross browser automation capabilities of
WebDriver
Elegance of jQuery content selection
Expressiveness of the Groovy language
Robustness of Page Object modelling
6. WebDriver
Successor to the Selenium project.
Also known as “Selenium 2”.
Sponsored and driven by Google.
Becoming a W3C standard.
http://dvcs.w3.org/hg/webdriver/raw-
file/515b648d58ff/webdriver-spec.html
8. What is cool new in WebDriver?
PhantomJS Based
Ghost Driver.
Implementation
of WebDriver Wire
Protocol.
Run your tests without
launching a browser.
9. GhostDriver 1.0.0
Navigation
Page content extraction
Arbitrary JS execution
Window handling
Frame handling
Screen-shot generation
Cookies
Element Search, Localization & Manipulation
Mouse interaction (even
though doubleClick and rightClick seems to be a bit
flaky)
Keyboard interaction
11. WebDriver API
Geb sits on top of WebDriver.
Geb never talks to the actual browser
because that's what WebDriver does.
12. Geb's inspiration
“Navigator API” that is inspired by jQuery.
// This is Geb code, not jQuery JavaScript…
$("h1").previous().children();
API is not identical.
13. Dynamic JVM Lang.
Groovy is…
Compiled, never interpreted
Dynamic, optionally typed
99% Java syntax compatible
Concise & clear
Great for DSLs
A comfortable Java alternative for most
14. Geb & Groovy
Geb uses Groovy's dynamism to
remove boilerplate.
import geb.*
Browser.drive {
to GoogleHomePage
at GoogleHomePage
search.field.value("wikipedia")
waitFor { at GoogleResultsPage }
assert firstResultLink.text() == "Wikipedia"
firstResultLink.click()
waitFor { at WikipediaPage }
}
15. Page Objects
The key to not pulling your hair
out when dealing with web tests.
16. What are they?
In a phrase: Domain Modelling.
By modelling and creating abstractions, we can isolate implementation
detail.
$("input[name=username]").value("user")
$("input[name=pwd]").value("password")
$("input[type=submit]").click()
Is far more fragile than this…
void login(String username, String password) {
$("input[name=username]").value(username)
$("input[name=pwd]").value(password)
$("input[type=submit]").click()
}
login("user", "password")
17. Browser has-a Page
Browser.drive {
to GoogleHomePage
at GoogleHomePage
search.field.value("wikipedia")
at GoogleResultsPage
assert firstResultLink.text() == "Wikipedia"
firstResultLink.click()
waitFor { at WikipediaPage }
}
The to() and click() methods are changing the
underlying page.
You can refer to the current page's content and
methods just by name.
18. Geb's Page Objects
Geb builds the Page Object pattern
directly into the framework (though it is
optional).
import geb.*
class GoogleHomePage extends Page {
static url = "http://google.com/ncr"
static at = { title == "Google" }
static content = {
search { module GoogleSearchModule }
}
}
19. Geb's Page Objects
Features the “Content DSL” for naming
content in a dynamic and powerful way.
import geb.*
class GoogleResultsPage extends Page {
static at = { waitFor { title.endsWith("Google Search") } }
static content = {
search { module GoogleSearchModule }
results { $("li.g") }
result { i -> results[i] }
resultLink { i -> result(i).find("a.l", 0) }
firstResultLink { resultLink(0) } } }
22. Geb for Testing
Geb can be used with…
Spock
JUnit (3 & 4)
TestNG
EasyB
Cucumber (Cuke4Duke)
The majority of Geb users use Spock.
Geb can dump HTML and screenshots for each
“test” to help in debugging.
24. Attribute/Text match
Can match on attribute values:
//<div foo="bar">
$("div", foo: "bar")
The “text” attribute is special:
//<div>foo</div>
$("div", text: "foo")
Can use Regular Expressions:
//<div>foo</div>
$("div", text: ~/f.+/)
25. Relative Content
$() returns a Navigator that allows you to find
relative content.
$("p").previous()
$("p").prevAll()
$("p").next()
$("p").nextAll()
$("p").parent()
$("p").siblings()
$("div").children()
Most of these methods take selectors, indexes
and attribute text/matchers too.
$("p").nextAll(".listing")
27. Content DSL
class GoogleResultsPage extends Page {
static content = {
results { $("li.g") }
result { i -> results[i] }
resultLink { i -> result(i).find("a.l", 0) }
firstResultLink { resultLink(0) }
}
}
Content definitions can build upon each
other.
Content definitions are actually templates.
28. Optional Content
class OptionalPage extends Page {
static content = {
errorMsg(required: false) { $("p.errorMsg") }
}
}
By default, Geb will error if the content you
select doesn't exist.
The “required” option disables this check.
29. Dynamic Content
class DynamicPage extends Page {
static content = {
errorMsg(wait: true) { $("p.errorMsg") }
}
}
Geb will wait for some time for this content to
appear.
By default, it will look for it every 100ms for 5s
before giving up. This is highly configurable.
Same semantics as the waitFor {} method that
can be used anywhere.
30. Expensive Content
class ExpensivePage extends Page {
static content = {
results(cache: true) { $("li.results") }
result { results[it] }
}
}
By default, all content is transient.
The cache option instructs Geb to hold on to the
content, avoiding redundant lookups.
Use carefully, can cause problems with dynamic
pages.
32. The to() method
class GoogleHomePage extends Page {
static url = "http://google.com/ncr"
}
Pages can define a url that defines the
page location.
The to() method sends the browser there
and sets that as the current page object.
33. Content based navigation
class FrontPage {
static content = {
aboutUsLink(to: AboutUsPage) { $("div#nav ul li a", text: iStartsWith("About Us")) }
}
}
When this content is clicked, the
underlying page will be changed
implicitly.
to FrontPage
aboutUsLink.click()
page instanceof AboutUsPage
34. At Checking
The “at checking” mechanism enables fail
fast and less debugging.
class LoginPage extends Page {
static at = { $("h1").text() == "Please log in" }
}
browser.at LoginPage
Will throw an exception if every statement
of the at check is not true.
35. Driver Management
Geb caches the WebDriver instance (per
thread) and shares it across test cases.
Manages clearing cookies and is
configurable.