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.
Slides from GeoDjango talk given by Eric Palakovich Carr. Last given in Washington, D.C. for django-district meetup on July 27th, 2011.
http://www.meetup.com/django-district/events/16015696/
Source code hosted on github:
https://github.com/bigsassy/geodjango_talk
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
I based my presention on the great "HTML5 for Web designers" by Jeremy Keith. Awesome and pragmatic book, the way I like it. Get your copy on: http://books.alistapart.com/products/html5-for-web-designers
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
Slides from GeoDjango talk given by Eric Palakovich Carr. Last given in Washington, D.C. for django-district meetup on July 27th, 2011.
http://www.meetup.com/django-district/events/16015696/
Source code hosted on github:
https://github.com/bigsassy/geodjango_talk
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
I based my presention on the great "HTML5 for Web designers" by Jeremy Keith. Awesome and pragmatic book, the way I like it. Get your copy on: http://books.alistapart.com/products/html5-for-web-designers
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
An overview of the Django rapid application development framework. Topics include the history of the framework, an architectural overview, how to get started, and a brief comparison to Ruby on Rails.
Data Migrations in the App Engine DatastoreRyan Morlok
Data migration is a core problem when dealing with web frameworks. Rails and Django have their own built-in migration tools to help you manage data, but with Google Cloud Datastore, things are bit more manual. This presentation walks through several techniques and Python examples that leverage deferred tasks or map reduce to keep the data for your app consistent with the state of your code.
The way JavaScript is standardized and improved is changing this year. Learning how will help you understand why transpilers have become so popular, and why we will likely be using them for a long time.
Ember itself will need to adapt to changes in JavaScript, and we will take a look at how the existing object model might be migrated to a pure EcmaScript solution.
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJLeonardo Balter
Slides apresentados no 16 EDTED, edição Rio de Janeiro, em 21 de Maio de 2011.
Aqui não tem vídeos, animações e códigos apresentados, mas tem os links. Logo passo o link completo.
BDD (Behaviour Driven Development) is a synthesis and refinement of practices stemming from TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development). Although BDD is principally an idea about how software development should be managed by both business interests and technical insight, the practice of BDD does assume the use of specialized software tools to support the development process.
November is Lung Cancer Awareness Month. Please wear pearls and stay educated on Lung Cancer. Anyone can get it. No one deserves Lung Cancer. Rest in peace gran <3
An overview of the Django rapid application development framework. Topics include the history of the framework, an architectural overview, how to get started, and a brief comparison to Ruby on Rails.
Data Migrations in the App Engine DatastoreRyan Morlok
Data migration is a core problem when dealing with web frameworks. Rails and Django have their own built-in migration tools to help you manage data, but with Google Cloud Datastore, things are bit more manual. This presentation walks through several techniques and Python examples that leverage deferred tasks or map reduce to keep the data for your app consistent with the state of your code.
The way JavaScript is standardized and improved is changing this year. Learning how will help you understand why transpilers have become so popular, and why we will likely be using them for a long time.
Ember itself will need to adapt to changes in JavaScript, and we will take a look at how the existing object model might be migrated to a pure EcmaScript solution.
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJLeonardo Balter
Slides apresentados no 16 EDTED, edição Rio de Janeiro, em 21 de Maio de 2011.
Aqui não tem vídeos, animações e códigos apresentados, mas tem os links. Logo passo o link completo.
BDD (Behaviour Driven Development) is a synthesis and refinement of practices stemming from TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development). Although BDD is principally an idea about how software development should be managed by both business interests and technical insight, the practice of BDD does assume the use of specialized software tools to support the development process.
November is Lung Cancer Awareness Month. Please wear pearls and stay educated on Lung Cancer. Anyone can get it. No one deserves Lung Cancer. Rest in peace gran <3
Guangzhou Purple Ox Optoelectronics Technology Co., Ltd., is one of the earliest commitment to the development, production LED light source logo ads, city smart LED lighting and LED lighting products a variety of other applications of high-tech businesses.
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
Get frustrated by cross-browser incompatibility? Hate to develop application using JavaScript? jQuery is a powerful JavaScript library that can enhance your websites regardless of your background. jQuery is fast, lean, simple and hugely expandable, enabling you to build compelling web applications quickly and easily. In this session, we will start with a quick introduction of jQuery, illustrate what’s so good about jQuery, and demonstrate step by step how to develop jQuery Ajax application efficiently with database, web services, OData, NetFlix and ASP.NET MVC. Microsoft is now shipping, supporting, and contributing to jQuery, with ASP.NET and Visual Studio. New features which will be available in the next release of jQuery such as globalization, templating and data-linking will be introduced in the session as well.
Brief introduction of Google App Engine and Play Framework.
Step-by-step instruction to develop and deploy play! web App on GAE with Siena persistence layer, CRUD management interface and login support.
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.
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.
Creating Modular Test-Driven SPAs with Spring and AngularJSGunnar Hillert
Single-page Applications (SPA) are all the rage these days and with them there is an avalanche of new tools, libraries and frameworks we need to know. But what does this mean for us as Spring developers? In this session we will give you an overview of the current landscape and illustrate the choices the Spring XD team has made for its user interface. What do I use to write SPA applications? How do I integrate them into existing Spring-based backends? How do I build them? Can I integrate them into my existing Gradle or Maven build processes in order to achieve complete build automation? How do I integrate realtime messaging using Spring's SockJS/WebSocket support? In this talk we will answer these and many more questions. We will cover frameworks such as AngularJS, Bootstrap, RequireJS; tools like Bower, Grunt, Gulp; and also talk about testing using Karma and Protractor.
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.
Learning About JavaScript (…and its little buddy, JQuery!)Julie Meloni
Slides from an internal workshop at the GWU Library on 26 June 2012. The workshop was organized into three parts: "Understanding JavaScript Basics", "About the DOM (Document Object Model)", and "Where JQuery Fits in and How it Works".
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
JMeter webinar - integration with InfluxDB and Grafana
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
1. Web Automation using Groovy, WebDriver,
JQuery and Page Object Model
By: Gaurav Bansal
2. Need…
• We need a solution that is based on technology
that is native to WebBrowsers.
• We need a solution that requires no boilerplate
code.
• We need a solution that offers a powerful set of
tools for matching a set of elements in a
document.
• We need a solution that offers in-built
mechanism to incorporate Page-object model
4. What is Geb?
• Geb is a browser automation solution.
• You can use it for…
– Acceptance Testing Web Applications
– Automating Web Sites
– Screen Scraping
• 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
5. About the Project
• Free Open Source, Apache License, Version
2.0.
• Currently at version 0.7.0.
– Home Page — http://www.gebish.org
– The Book of Geb — http://www.gebish.org
/manual/current
– Source Code — https://github.com/geb/geb
– User Mailing List — http://
xircles.codehaus.org/projects/geb/lists
– In Maven Central — http://
mvnrepository.com/artifact/org.codehaus.geb
6. Project Components
• The heart is the geb-core component which is
all you really need (plus WebDriver).
• For testing, you probably also want one of these
as well:
– geb-spock
– geb-junit3
– geb-junit4
– geb-testng
– geb-easyb
• (Has been used from Cucumber as well).
• There is also a Grails plugin.
8. 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
9. Cross-browser
Automation
Java based, with many language bindings.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");
WebElement heading = driver.findElement(By.tagName("h1"));
10. Mobile Browsers
• Rapidly improving.
– iPad
– iPhone
– Android
– Blackberry
• Can use real devices or emulators in most
cases.
• A headless webkit based driver
(PhantomJS) is in progress.
11. WebDriver API
• Geb sits on top of WebDriver so you very
rarely deal with its API, though it's
accessible if you need it.
• Geb never talks to the actual browser
because that's what WebDriver does.
12. Driver dependency
• You need to pull in a specific driver
implementation for each browser you want
to work with.
– <dependency>
– <groupId>org.seleniumhq.selenium</groupId>
– <artifactId>selenium-firefox-driver</artifactId>
– <version>2.24.1</version>
– </dependency>
14. JQuery
• jQuery provides an incredibly powerful API
for navigating and selecting content.
– $("div#footer").prev().children();
– CSS based, a whole lot better than XPath.
15. Geb's inspiration
• Geb features a “Navigator API” that is
inspired by jQuery.
– // This is Geb code, not jQuery JavaScript… $
("h1").previous().children();
• API is not identical.
17. Dynamic JVM Lang.
• Groovy is…
– Compiled, never interpreted
– Dynamic, optionally typed
– 99% Java syntax compatible
– Concise, clear and pragmatic
– Great for DSLs
– A comfortable Java alternative for most
18. Geb & Groovy
• Geb uses Groovy's dynamism to
remove boilerplate.
import geb.*
Browser.drive {
to GoogleHomePage
at GoogleHomePage
search.forTerm "wikipedia“
at GoogleResultsPage
assert firstResultLink.text() == "Wikipedia"
firstResultLink.click()
waitFor { at WikipediaPage }
}
19. Page Objects
The key to not pulling your hair
out when dealing with web tests.
20. 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")
21. Just good programming
• It's the application of trusted principles;
encapsulation and reuse.
• Not new at all, but new to the world of web
testing/automation.
• Not just about modelling “pages”. It's
about modelling all kinds of things in the
domain of a user's actions online.
• Just giving symbolic names to page
content is a great start.
22. Browser has-a Page
Browser.drive {
to GoogleHomePage
at GoogleHomePage
search.forTerm "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.
23. 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 }
}
}
24. 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) } } }
27. 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.
29. The $() method
• Returns a Navigator object.
• General format:
–$
(«css selector», «index/range», «attribute/text
matchers»)
• Examples:
– $("div") // all divs
– $("div", 0) // first div $("div", 0..2) // first three divs
– // The third section heading with text “Geb” $("h2", 2, id: "section", text: "Geb")
30. CSS Selectors
• Full CSS3 if the target browser supports it.
$("div.some-class p:first[title='something']")
$("ul li a") $("table tr:nth-child(2n+1) td")
$("div#content p:first-child::first-line")
• CSS lookups are fast.
31. 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.+/)
33. 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")
42. 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.
43. Driver Management
• Geb caches the WebDriver instance (per
thread) and shares it across test cases.
• Manages clearing cookies and is
configurable.
• This can be disabled and tuned.
44. Config. Management
• Looks for GebConfig class or GebConfig.groovy
file (or class) on classpath.
driver = {
new FirefoxDriver()
}
waiting {
timeout = 2
slow { timeout = 100 }
}
reportsDir = "geb-reports“
environments {
chrome { driver = "chrome" }
}
45. What we didn't see
• JavaScript interface
• jQuery interface
• Direct Downloading
• Multi Window support
• Frame support
• Page Change Listening
• Actions (e.g. Drag & Drop)
• alert()/confirm() handling