This document provides an overview of Rajesh Kumar's background and experience in automation testing. It includes details such as his education, the companies he has worked for, and his expertise with various automation tools and languages like Selenium, Java, and others. The document also includes a table of contents that outlines the topics to be covered in subsequent chapters, which will discuss concepts like the "Hello World" program, Java basics, control flow statements, file I/O, and more advanced Selenium techniques. Rajesh aims to provide step-by-step guidance to learning automation testing using these foundational Java and Selenium topics.
Access our sample Java8 certification questions.
1z0-808 certification questions ready to be used.
For each 1z0-808 certification question you can find the solution, the explanation and the exam objective of 1z0-808
This document provides 3 methods for starting to program in Java:
1. Using the shell to run Java code by compiling .java files with javac and running .class files with java.
2. Using the Eclipse IDE which provides an abstraction for programming without needing to install the JDK.
3. Creating a first program in Java by installing an editor, creating a class file, compiling with javac, and running with java.
This document discusses Java class libraries, exceptions, and input/output. It covers the structure of the Java API and how to import classes. It also describes checked and unchecked exceptions, and how to write exception handling code. Finally, it provides examples of reading and writing text and binary files using different stream classes like FileReader, FileWriter, BufferedReader, and BufferedWriter.
The document discusses 201 core Java interview questions organized into different categories like basics of Java, OOPs concepts, strings, threads, and JDBC. It provides short answers to questions on topics like the JDK, JRE, JVM, static methods, inheritance, polymorphism, method overloading and more. The answers are meant to help candidates prepare for 90% of frequently asked interview questions.
Java is a programming language that is simple, object-oriented, and robust. It allows programs to be portable across platforms and provides automatic memory management through garbage collection. Key features of Java include its platform independence through bytecode, its object-oriented approach, networking capabilities, security features, performance through just-in-time compilation, and support for multithreading. Java code is compiled to bytecode that can run on any Java Virtual Machine, making programs highly portable.
This document provides an introduction and overview of Java applet programming. It discusses what Java and applets are, the applet skeleton structure including common lifecycle methods like init(), start(), paint(), stop(), and destroy(). It also outlines the steps to write an applet code, compile it, and include it in an HTML file using applet tags to display the applet. An example Java applet class and HTML code is provided at the end to demonstrate a simple "Hello World" style applet.
This document provides an overview of Java fundamentals including its history, key components like the JDK and JRE, how bytecode and the JVM enable platform independence, and core object-oriented programming principles. It describes how Java was created in the early 1990s to control consumer devices, the development of applets for web browsers, and how bytecode compilation allows the same code to run on any device with a Java Virtual Machine.
The abstract factory pattern provides a way to create families of related objects without specifying their concrete classes. An abstract factory interface is used to create concrete factory objects that return product objects. Concrete factory classes implement the abstract factory interface and return products of a specific type. A client uses the abstract factory interface to get a concrete factory object and then calls the factory to create and return product objects without knowing the concrete product classes.
Access our sample Java8 certification questions.
1z0-808 certification questions ready to be used.
For each 1z0-808 certification question you can find the solution, the explanation and the exam objective of 1z0-808
This document provides 3 methods for starting to program in Java:
1. Using the shell to run Java code by compiling .java files with javac and running .class files with java.
2. Using the Eclipse IDE which provides an abstraction for programming without needing to install the JDK.
3. Creating a first program in Java by installing an editor, creating a class file, compiling with javac, and running with java.
This document discusses Java class libraries, exceptions, and input/output. It covers the structure of the Java API and how to import classes. It also describes checked and unchecked exceptions, and how to write exception handling code. Finally, it provides examples of reading and writing text and binary files using different stream classes like FileReader, FileWriter, BufferedReader, and BufferedWriter.
The document discusses 201 core Java interview questions organized into different categories like basics of Java, OOPs concepts, strings, threads, and JDBC. It provides short answers to questions on topics like the JDK, JRE, JVM, static methods, inheritance, polymorphism, method overloading and more. The answers are meant to help candidates prepare for 90% of frequently asked interview questions.
Java is a programming language that is simple, object-oriented, and robust. It allows programs to be portable across platforms and provides automatic memory management through garbage collection. Key features of Java include its platform independence through bytecode, its object-oriented approach, networking capabilities, security features, performance through just-in-time compilation, and support for multithreading. Java code is compiled to bytecode that can run on any Java Virtual Machine, making programs highly portable.
This document provides an introduction and overview of Java applet programming. It discusses what Java and applets are, the applet skeleton structure including common lifecycle methods like init(), start(), paint(), stop(), and destroy(). It also outlines the steps to write an applet code, compile it, and include it in an HTML file using applet tags to display the applet. An example Java applet class and HTML code is provided at the end to demonstrate a simple "Hello World" style applet.
This document provides an overview of Java fundamentals including its history, key components like the JDK and JRE, how bytecode and the JVM enable platform independence, and core object-oriented programming principles. It describes how Java was created in the early 1990s to control consumer devices, the development of applets for web browsers, and how bytecode compilation allows the same code to run on any device with a Java Virtual Machine.
The abstract factory pattern provides a way to create families of related objects without specifying their concrete classes. An abstract factory interface is used to create concrete factory objects that return product objects. Concrete factory classes implement the abstract factory interface and return products of a specific type. A client uses the abstract factory interface to get a concrete factory object and then calls the factory to create and return product objects without knowing the concrete product classes.
The document contains interview questions from various companies like HCL, Emids, Manhattan, 3PLM, Zolipe Solutions, Synchronoss, and Cognizant for positions ranging from 2-3 years of experience in Selenium testing. The questions cover a wide range of topics including Selenium, manual testing, Java, SQL, algorithms, data structures and design patterns. Common questions asked relate to frameworks, test automation lifecycles, handling dynamic elements, test case design techniques, and debugging skills.
This document provides an overview of Android development for Java developers. It discusses Android software stacks, development tools, Google development references and tools, and includes examples of building a "Hello World" app, using XML for the UI, activities and fragments, intents, common views, list views and adapters, dialogs, toasts, the support library, and Google Play services. The presentation was given by Michael Hantler of FullStack Developers Israel on April 24th, 2014.
The document discusses Java packages and classes. It describes common Java API packages like java.lang, java.util, java.io, java.awt, and java.net and what types of classes they contain. It also provides examples of using packages like Vector, Random, Date, and Calendar classes and their key methods. The Calendar class allows interpreting dates and times, defining constants used for components like MONTH, DATE, HOUR, etc.
The document provides an introduction to programming in Java, including:
1. Installing the Java Development Kit (JDK) is necessary to both compile and run Java applications on a variety of operating systems.
2. Two methods for starting to program in Java are presented: using the shell to run Java code manually, or using the Eclipse integrated development environment.
3. Key Java concepts like classes, objects, inheritance, abstraction, and encapsulation are defined to help new programmers understand object-oriented programming principles in Java.
Java is an object-oriented programming language introduced in 1995. It is platform independent and used widely for web applications. Java code is compiled into bytecode that runs on a virtual machine, allowing the same code to run on different operating systems. Key features of Java include being simple, object-oriented, platform independent, robust, secure, distributed, multithreaded, and dynamic.
This document outlines Java labs covering topics such as an introduction to Java, the Java language, classes, exceptions, threads, and input/output. Each lab contains exercises with tasks to complete a programming assignment. For example, Lab 01 covers downloading and installing JDK and writing a "Hello World" program in Eclipse. Lab 02 contains exercises on operators, data types, conditionals, and arrays. Lab 03 focuses on object-oriented programming with classes and relationships.
The document discusses the seven pillars of ASP.NET that differentiated it from previous web development platforms when it was first released. These pillars include: 1) ASP.NET being integrated with the .NET Framework; 2) ASP.NET applications being compiled instead of interpreted; 3) ASP.NET being multilanguage; 4) ASP.NET being hosted by the Common Language Runtime; 5) ASP.NET being object-oriented; 6) ASP.NET supporting all browsers; and 7) ASP.NET having a stateful programming model.
This document provides an overview of key concepts covered in the Sun Certified Java Programmer (SCJP) 1.4 exam, including:
- Arrays in Java - how to declare, construct, initialize, and access array elements.
- Class modifiers like public, private, protected that restrict access, and final that prevents subclassing. Method and variable modifiers like static, abstract, synchronized are also discussed.
- Constructors - how they are invoked using this() and super(), default constructors, and cases where a default constructor is not provided by the compiler.
The document gives examples of each concept and is intended to help readers prepare for the SCJP certification exam by learning about its main objectives
DevLabs Alliance Top 50 Selenium Interview Questions for SDETDevLabs Alliance
DevLabs Alliance Selenium Interview Questions for SDET will help SDETs to prepare for their interviews. Learn top 50 questions with their answers for Selenium which are majorly asked in interview for SDET role.
The document provides 20 basic Java interview questions for software development engineers in test (SDET) roles. The questions cover topics such as Java access specifiers, object-oriented programming principles, the differences between inner classes and subclasses, overloading and overriding methods, threads and exceptions, and collections. The document is intended to help SDETs prepare for technical interviews by providing example questions and explanations of core Java concepts.
This document discusses event handling in Java. It describes the delegation event model where a source generates an event and sends it to one or more listeners. It outlines several common listener interfaces like ActionListener, ItemListener, KeyListener, MouseListener, and WindowListener. For each interface it provides the listener methods and describes how to write an event handler class to implement the interface. It also discusses the classes for different event types like ActionEvent, ItemEvent, KeyEvent, and MouseEvent.
Top 20 software testing interview questions for sdetDevLabs Alliance
The document provides an overview of 20 common interview questions for software development engineering in test (SDET) roles. It defines key terms like SDET, test cases, test plans, and test scripts. It also explains different types of testing such as alpha and beta testing, sanity and regression testing, and boundary value testing. Additionally, it outlines the responsibilities of an SDET, differences between verification and validation, and how to prepare a requirements traceability matrix.
This document provides an overview of Java, including where it is used, classes and objects in Java, a simple Java program, and how it compares to C++. Java is an object-oriented, platform-independent language used for desktop, web, enterprise, mobile, and embedded applications. A class defines common attributes and behaviors of objects. A Java program contains a main method that is the entry point and gets compiled into bytecode then machine code when executed. The main difference between Java and C++ is that Java is platform independent while C++ is platform dependent.
This document provides an introduction to the Java programming language. It describes the course on Java being taught, including location, schedule, and instructor. It then discusses Java's history, features, the Java Virtual Machine (JVM) and its architecture. Finally, it introduces object-oriented programming concepts like objects, classes, and provides a simple example Java program.
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Selenium interview questions and answerskavinilavuG
This document contains 37 questions and answers related to Selenium interview questions. Some key topics covered include commonly used annotations in TestNG, reading and writing data to Excel files using Selenium, locating elements using different locator strategies like XPath, handling alerts and popups, performing actions like drag-and-drop, uploading files, and synchronizing tests. It also discusses frameworks, prerequisites for running Selenium tests, advantages of the Selenium WebDriver, and using Selenium Grid for distributed testing.
This document provides an overview of applets, including:
- Applets are Java programs that run within web browsers. Examples include interactive scientific visualizations and real-time satellite trackers.
- Applets have a lifecycle controlled by the browser via init(), start(), stop(), and destroy() methods. They are also subject to security restrictions since they are downloaded from the web.
- Resources like images, audio, and text files can be accessed from the home server hosting the applet. Communication between the applet and browser is also possible using the AppletContext interface.
This document provides an overview of test automation using Selenium. It discusses reasons to automate testing such as supporting regression testing and finding defects missed by manual testing. It also discusses when not to automate, such as when an application's behavior is unstable. The document then covers the Selenium framework, its components like Selenium IDE and WebDriver, and languages it supports like Java. It also discusses concepts in object-oriented programming relevant to test automation like classes, objects, inheritance and more.
Java can be used two types of programs: applications & applets.An application is a program that runs on your computer, under the operating system of that computer.
An applets is an application designed to be transmitted over the Internet and executed by a java-compatible Web Browser. An applet is an executable program that runs inside a browser, such as Netscape or Internet Explorer.
The document contains interview questions from various companies like HCL, Emids, Manhattan, 3PLM, Zolipe Solutions, Synchronoss, and Cognizant for positions ranging from 2-3 years of experience in Selenium testing. The questions cover a wide range of topics including Selenium, manual testing, Java, SQL, algorithms, data structures and design patterns. Common questions asked relate to frameworks, test automation lifecycles, handling dynamic elements, test case design techniques, and debugging skills.
This document provides an overview of Android development for Java developers. It discusses Android software stacks, development tools, Google development references and tools, and includes examples of building a "Hello World" app, using XML for the UI, activities and fragments, intents, common views, list views and adapters, dialogs, toasts, the support library, and Google Play services. The presentation was given by Michael Hantler of FullStack Developers Israel on April 24th, 2014.
The document discusses Java packages and classes. It describes common Java API packages like java.lang, java.util, java.io, java.awt, and java.net and what types of classes they contain. It also provides examples of using packages like Vector, Random, Date, and Calendar classes and their key methods. The Calendar class allows interpreting dates and times, defining constants used for components like MONTH, DATE, HOUR, etc.
The document provides an introduction to programming in Java, including:
1. Installing the Java Development Kit (JDK) is necessary to both compile and run Java applications on a variety of operating systems.
2. Two methods for starting to program in Java are presented: using the shell to run Java code manually, or using the Eclipse integrated development environment.
3. Key Java concepts like classes, objects, inheritance, abstraction, and encapsulation are defined to help new programmers understand object-oriented programming principles in Java.
Java is an object-oriented programming language introduced in 1995. It is platform independent and used widely for web applications. Java code is compiled into bytecode that runs on a virtual machine, allowing the same code to run on different operating systems. Key features of Java include being simple, object-oriented, platform independent, robust, secure, distributed, multithreaded, and dynamic.
This document outlines Java labs covering topics such as an introduction to Java, the Java language, classes, exceptions, threads, and input/output. Each lab contains exercises with tasks to complete a programming assignment. For example, Lab 01 covers downloading and installing JDK and writing a "Hello World" program in Eclipse. Lab 02 contains exercises on operators, data types, conditionals, and arrays. Lab 03 focuses on object-oriented programming with classes and relationships.
The document discusses the seven pillars of ASP.NET that differentiated it from previous web development platforms when it was first released. These pillars include: 1) ASP.NET being integrated with the .NET Framework; 2) ASP.NET applications being compiled instead of interpreted; 3) ASP.NET being multilanguage; 4) ASP.NET being hosted by the Common Language Runtime; 5) ASP.NET being object-oriented; 6) ASP.NET supporting all browsers; and 7) ASP.NET having a stateful programming model.
This document provides an overview of key concepts covered in the Sun Certified Java Programmer (SCJP) 1.4 exam, including:
- Arrays in Java - how to declare, construct, initialize, and access array elements.
- Class modifiers like public, private, protected that restrict access, and final that prevents subclassing. Method and variable modifiers like static, abstract, synchronized are also discussed.
- Constructors - how they are invoked using this() and super(), default constructors, and cases where a default constructor is not provided by the compiler.
The document gives examples of each concept and is intended to help readers prepare for the SCJP certification exam by learning about its main objectives
DevLabs Alliance Top 50 Selenium Interview Questions for SDETDevLabs Alliance
DevLabs Alliance Selenium Interview Questions for SDET will help SDETs to prepare for their interviews. Learn top 50 questions with their answers for Selenium which are majorly asked in interview for SDET role.
The document provides 20 basic Java interview questions for software development engineers in test (SDET) roles. The questions cover topics such as Java access specifiers, object-oriented programming principles, the differences between inner classes and subclasses, overloading and overriding methods, threads and exceptions, and collections. The document is intended to help SDETs prepare for technical interviews by providing example questions and explanations of core Java concepts.
This document discusses event handling in Java. It describes the delegation event model where a source generates an event and sends it to one or more listeners. It outlines several common listener interfaces like ActionListener, ItemListener, KeyListener, MouseListener, and WindowListener. For each interface it provides the listener methods and describes how to write an event handler class to implement the interface. It also discusses the classes for different event types like ActionEvent, ItemEvent, KeyEvent, and MouseEvent.
Top 20 software testing interview questions for sdetDevLabs Alliance
The document provides an overview of 20 common interview questions for software development engineering in test (SDET) roles. It defines key terms like SDET, test cases, test plans, and test scripts. It also explains different types of testing such as alpha and beta testing, sanity and regression testing, and boundary value testing. Additionally, it outlines the responsibilities of an SDET, differences between verification and validation, and how to prepare a requirements traceability matrix.
This document provides an overview of Java, including where it is used, classes and objects in Java, a simple Java program, and how it compares to C++. Java is an object-oriented, platform-independent language used for desktop, web, enterprise, mobile, and embedded applications. A class defines common attributes and behaviors of objects. A Java program contains a main method that is the entry point and gets compiled into bytecode then machine code when executed. The main difference between Java and C++ is that Java is platform independent while C++ is platform dependent.
This document provides an introduction to the Java programming language. It describes the course on Java being taught, including location, schedule, and instructor. It then discusses Java's history, features, the Java Virtual Machine (JVM) and its architecture. Finally, it introduces object-oriented programming concepts like objects, classes, and provides a simple example Java program.
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Selenium interview questions and answerskavinilavuG
This document contains 37 questions and answers related to Selenium interview questions. Some key topics covered include commonly used annotations in TestNG, reading and writing data to Excel files using Selenium, locating elements using different locator strategies like XPath, handling alerts and popups, performing actions like drag-and-drop, uploading files, and synchronizing tests. It also discusses frameworks, prerequisites for running Selenium tests, advantages of the Selenium WebDriver, and using Selenium Grid for distributed testing.
This document provides an overview of applets, including:
- Applets are Java programs that run within web browsers. Examples include interactive scientific visualizations and real-time satellite trackers.
- Applets have a lifecycle controlled by the browser via init(), start(), stop(), and destroy() methods. They are also subject to security restrictions since they are downloaded from the web.
- Resources like images, audio, and text files can be accessed from the home server hosting the applet. Communication between the applet and browser is also possible using the AppletContext interface.
This document provides an overview of test automation using Selenium. It discusses reasons to automate testing such as supporting regression testing and finding defects missed by manual testing. It also discusses when not to automate, such as when an application's behavior is unstable. The document then covers the Selenium framework, its components like Selenium IDE and WebDriver, and languages it supports like Java. It also discusses concepts in object-oriented programming relevant to test automation like classes, objects, inheritance and more.
Java can be used two types of programs: applications & applets.An application is a program that runs on your computer, under the operating system of that computer.
An applets is an application designed to be transmitted over the Internet and executed by a java-compatible Web Browser. An applet is an executable program that runs inside a browser, such as Netscape or Internet Explorer.
Java is a general-purpose; object oriented programming language developed by Sun Microsystems of USA in 1991. This language was initially called “Oak” by James Gosling, but was renamed “Java” in 1995. Java (with a capital J) is a high-level, third generation programming language, like C, Fortran, Smalltalk, Perl, and many others.Java was initially designed to solve on a small scale could also be applied to the Internet on a large scale. This realization caused the focus of Java to switch from consumer electronic to Internet Programming.Java was designed for the development of software for consumer electronic devices like TVs, VCRs, Toasters, Microwaves ovens and such other electronics devices.Java is a first programming language that is not tied to any particular hardware or operating system. Programs developed in Java can be executed anywhere on any system.
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESsuthi
Short Notes on OOP
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data, in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). A feature of objects is an object's procedures that can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another. OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.
This document provides instructions on how to start programming in Java. It discusses installing the Java Development Kit (JDK) which allows compiling and running Java applications. It also covers using the Eclipse integrated development environment and creating a basic Java project within Eclipse. The document then introduces some key Java concepts like primitive data types, operators, and strings.
The document introduces abstract data types (ADTs) and common ADT implementations like bags, lists, stacks, queues, dictionaries, and trees. It discusses the history and characteristics of the Java programming language. It provides an example of a simple Java program that prints output and explains the anatomy of a Java program including comments, reserved words, modifiers, statements, blocks, classes, and methods. It also discusses how to get user input in Java using the Scanner class.
The document provides an overview of the Samsung University Program and key concepts related to Java programming including:
1. Java is an object-oriented, platform independent programming language that is robust, secure, and supports multithreading.
2. The key concepts of object-oriented programming in Java include encapsulation, inheritance, polymorphism, and abstraction.
3. Java applications are compiled into bytecode that can run on any system with a Java Virtual Machine, allowing programs to be "write once, run anywhere."
- The document is a lab manual for an introductory Java programming course that provides instructions on installing Java, using an IDE, and writing simple Java programs.
- It explains how to create a "Hello World" Java program using BlueJ or JCreator IDEs, compile and run the program, and addresses common errors students may encounter.
- The document provides an example "Hello World" Java program and explains the key components of a basic Java class including the class definition, main method, and use of System.out.println to display output.
Understanding Framework Architecture using Eclipseanshunjain
Talk on Framework architectures given at SAP Labs India for Eclipse Day India 2011 - Code attached Here: https://sites.google.com/site/anshunjain/eclipse-presentations
Intro to programing with java-lecture 1Mohamed Essam
The document provides an introduction to Java programming, including definitions of Java, how Java works, and the basic structure of a Java program. It explains that Java code is compiled to bytecode that can run on any device, and discusses the typical components of a Java program, including classes, methods, and the main method where program execution begins. It also provides a simple "Hello World" example Java program to demonstrate how a basic Java file is structured.
This document appears to be an assignment submission cover page for a student named Narinder Kumar studying MCA at Sikkim Manipal University. It provides details of the assignment such as the course, subject, semester, and date of submission. The document contains the student's responses to 5 questions on Java programming concepts and features.
The document discusses why software developers should use FlexUnit, an automated unit testing framework for Flex and ActionScript projects. It notes that developers spend 80% of their time debugging code and that errors found later in the development process can cost 100x more to fix than early errors. FlexUnit allows developers to automate unit tests so that tests can be run continually, finding errors sooner when they are cheaper to fix. Writing automated tests also encourages developers to write better structured, more testable and maintainable code. FlexUnit provides a testing architecture and APIs to facilitate automated unit and integration testing as well as different test runners and listeners to output test results.
This document provides an overview of Java essentials including:
- Java addressed issues with C/C++ like inconsistent frameworks and memory management issues.
- Java introduced a common framework, garbage collection, and object oriented programming.
- The history of Java versions from 1.0 to 6.0 is summarized.
- A simple "Hello World" Java program is broken down and explained.
This document provides information about a student named Mohd. Shahnawaz Alam enrolled in the third semester of a B.Sc. (IT) program. It includes their roll number, book information, and questions about features of Java, executing Java programs, operators in Java, character extraction functions, types of relationships in Java, differences between errors and exceptions, and syntax for FileInputStream and FileOutputStream classes. The document contains detailed responses to each question providing explanations of concepts and code examples.
This document is an industrial training report submitted by students to fulfill the requirements of a Bachelor of Technology degree in computer science and engineering. It contains an introduction to key Java concepts such as what Java is, its basic syntax including identifiers, arrays, enums, and keywords. It also discusses object-oriented programming concepts in Java like inheritance, interfaces, constructors, and access specifiers. The report is divided into chapters that cover these concepts in further detail along with other OOP principles like polymorphism and abstraction.
The document provides an overview of a presentation on core Java concepts including details about the Encapsulate Logics institute where the presentation will take place, background on Java founder James Gosling, definitions and characteristics of Java, and versions of the Java Development Kit. Key aspects of object-oriented programming such as encapsulation, inheritance, and polymorphism are also explained. The presentation aims to impart programming skills and practical concepts of Java to students.
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
This presentation provides valuable insights into effective cost-saving techniques on AWS. Learn how to optimize your AWS resources by rightsizing, increasing elasticity, picking the right storage class, and choosing the best pricing model. Additionally, discover essential governance mechanisms to ensure continuous cost efficiency. Whether you are new to AWS or an experienced user, this presentation provides clear and practical tips to help you reduce your cloud costs and get the most out of your budget.
Dandelion Hashtable: beyond billion requests per second on a commodity serverAntonios Katsarakis
This slide deck presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
Digital Marketing Trends in 2024 | Guide for Staying AheadWask
https://www.wask.co/ebooks/digital-marketing-trends-in-2024
Feeling lost in the digital marketing whirlwind of 2024? Technology is changing, consumer habits are evolving, and staying ahead of the curve feels like a never-ending pursuit. This e-book is your compass. Dive into actionable insights to handle the complexities of modern marketing. From hyper-personalization to the power of user-generated content, learn how to build long-term relationships with your audience and unlock the secrets to success in the ever-shifting digital landscape.
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Tatiana Kojar
Skybuffer AI, built on the robust SAP Business Technology Platform (SAP BTP), is the latest and most advanced version of our AI development, reaffirming our commitment to delivering top-tier AI solutions. Skybuffer AI harnesses all the innovative capabilities of the SAP BTP in the AI domain, from Conversational AI to cutting-edge Generative AI and Retrieval-Augmented Generation (RAG). It also helps SAP customers safeguard their investments into SAP Conversational AI and ensure a seamless, one-click transition to SAP Business AI.
With Skybuffer AI, various AI models can be integrated into a single communication channel such as Microsoft Teams. This integration empowers business users with insights drawn from SAP backend systems, enterprise documents, and the expansive knowledge of Generative AI. And the best part of it is that it is all managed through our intuitive no-code Action Server interface, requiring no extensive coding knowledge and making the advanced AI accessible to more users.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the “Temporal Event Neural Networks: A More Efficient Alternative to the Transformer” tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChip’s Akida neuromorphic hardware IP further enhances TENNs’ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
A Comprehensive Guide to DeFi Development Services in 2024Intelisync
DeFi represents a paradigm shift in the financial industry. Instead of relying on traditional, centralized institutions like banks, DeFi leverages blockchain technology to create a decentralized network of financial services. This means that financial transactions can occur directly between parties, without intermediaries, using smart contracts on platforms like Ethereum.
In 2024, we are witnessing an explosion of new DeFi projects and protocols, each pushing the boundaries of what’s possible in finance.
In summary, DeFi in 2024 is not just a trend; it’s a revolution that democratizes finance, enhances security and transparency, and fosters continuous innovation. As we proceed through this presentation, we'll explore the various components and services of DeFi in detail, shedding light on how they are transforming the financial landscape.
At Intelisync, we specialize in providing comprehensive DeFi development services tailored to meet the unique needs of our clients. From smart contract development to dApp creation and security audits, we ensure that your DeFi project is built with innovation, security, and scalability in mind. Trust Intelisync to guide you through the intricate landscape of decentralized finance and unlock the full potential of blockchain technology.
Ready to take your DeFi project to the next level? Partner with Intelisync for expert DeFi development services today!
A Comprehensive Guide to DeFi Development Services in 2024
Selenium web driver | java
1. About Author:
Rajesh Kumar
Bachelor of Technology graduate in Computer Science from Uttar Pradesh Technology
University in 2004. He has started his career as an automation engineer in 2004 and has
14+ years of experience in automation domain. He has worked with top
notch organization in e-Commerce, e-Learning, Travel and Banking Domain.
Currently he is working as an automation architect with a multinational company. He is
very passionate about exploring different automation tools for functional and non-
functional automation. He is a subject matter expert for functional automation tools i.e.
Win Runner, QTP (Quick Test Professional), RFT (Rational Functional Tester), Silk Test,
Selenium, Test Complete, Appium and SeeTest. He has extensive experience in
automation team building, Automation tools training, automation framework development
and automation project supports as SME.
2. Table of Contents
Chapter-1| ‘Hello World’ Program.............................................................................................. 3
Chapter-2 | Java Basic Concept- Part-1....................................................................................... 5
Chapter-3 | Java Basic Concept- Part-2....................................................................................... 8
Chapter-4 | A Closer Look at the "Hello World!" ...................................................................... 12
Chapter-5 | A Closer Look at Function...................................................................................... 14
Chapter-6 | Control Flow Statements....................................................................................... 17
Chapter-7 | File Input Output Operations................................................................................. 20
Chapter-8 | First Selenium Program ......................................................................................... 23
Chapter-9 | A Closer Look at First Selenium Program............................................................... 27
Chapter-10 | Identifying Objects Uniquely ............................................................................... 29
Chapter-11 | Advance Technique to Compose CSS and XPATH locator..................................... 32
3. Chapter-1| ‘Hello World’ Program
Step-1 | Choosing Automation Tool and Language
The first step to start learning automation is to finalize on the tool/API and the language.
This is the most problematic step to decide on the tool and the language. Your search for
the latest market trend, consult your friends from the automation background and even
your senior. Everyone will have a different opinion. Even my opinion changes with time
and with the person I am talking to so, the best way are to go with the Public Poll.
Choose the tool and language with the highest community support and is open source.
Nowadays Selenium with Java is the best suite for you to learn automation. I know
JavaScript is gaining more popularity. Also, Mobile automation is gaining more popularity
then desktop automation as mobile users and mobile apps are increasing exponentially.
But, just don't forget we are talking about the first step.
Step-2 | Installing Eclipse and Java
This is the most difficult step for the person who wants to start with automation. Even I
have given up for many tools before I have started. Installation and configuration are the
most tricky and irritating job. The reason is we do not know which version is required what
all software's are required. What setting need to be done blah blah….
To make it easy for you guys/gals, we will take step by step.
1. Check if java is installed on your machine if not install it using following steps
2. Use java –version command on command prompt to check java version on your
machine. In case it is not installed on your machine you will get error message. In
case you have a java version which is older than 1.6 then upgrade it
3. Download latest version of Java SE Development Kit from following
location: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html
4. Install latest version of Java (64 bit or 32 bit) corresponding to your machine operating
system
5. Download Eclipse (64 bit or 32 bit) corresponding to your machine operating
system: https://eclipse.org/downloads/
6. Create a new folder “AutomationWorkspace” in your D drive or any other drive of
your machine
7. Unzip eclipse folder and navigate to the folder where you will see eclipse.exe
8. Double click on eclipse.exe to open Eclipse and provide the path of
the “AutomationWorkspace” when pop-up appears for ‘select a workspace’ and
click on ‘OK’ button.
9. Click on File -- New – Others
10.Select ‘Java Project’ from the ‘Select a wizard’ model window and click on
‘Next’ button
11.Enter Project name as ‘HelloWorld’ in ‘Create a Java Project’ model window and
click on ‘Finish’
12.Click on + (expansion sign) in ‘Package Explorer’ pane to expend the project folder
4. 13.Add a package to your project folder using following steps:
ü Mouse Right click on ‘src’ folder
ü Select New -- Package
ü Enter Package Name as ‘mypackage’
14.Add a class to your package created in above step using following steps:
ü Mouse Right click on ‘mypackage’folder
ü Select New -- Class
ü Enter Class Name as ‘MyClass’
15.Write your first Hello World Program
package mypackage;
public class MyClass {
public static void main (String args[]){
System.out.println("Hello World !!");
}
}
16.Click on Run button and Enjoy
Challenges You Might Face:
1. You might face some issue when you are installing Java for the first time on your
machine
2. Java Home need to be set in Environment variable (you will get many article and
videos)
3. Java version should be compatible with your Eclipse version that you have
downloaded else eclipse will throw error while launching. You can check it online
which version of eclipse is compatible with which java version.
Note: You can always post your question in case facing any issue. I will be happy to help
you all, but don’t give up.
“The more you know, the more you know you don't know.” - Aristotle
5. Chapter-2 | Java Basic Concept- Part-1
Bad habits die hard; it’s very true as we all have the tendency to achieve most with least
effort. So, I will try to cover least required to come to a platform from where you can start
working on automation. But, before we start working on automation we should at least
learn few concepts which will help you in understanding what you are doing.
Variables:
Variables are nothing but reserved memory locations to store values. This means that
when you create a variable you reserve some space in memory.
Based on the data type of a variable, the operating system allocates memory and decides
what can be stored in the reserved memory. Therefore, by assigning different data types
to variables, you can store integers, decimals, or characters in these variables.
Data Type:
There are two data types available in Java:
Primitive Data Types:
There are eight primitive data types supported by Java. Primitive data types are
predefined by the language and named by a keyword:
§ byte e.g. byte a = 100
§ short e.g. short s = 10000
§ int e.g. int a = 100000
§ float e.g. float f1 = 234.5
§ double e.g. double d1 = 123.44
§ boolean e.g. boolean one = true
§ char e.g. char letterA ='A'
Reference/Object Data Types:
Reference variables are created using defined constructors of the classes. They are used
to access objects.
Arithmetic Operators:
+ Additive operator (also used for String concatenation)
- Subtraction operator
* Multiplication operator
/ Division operator
% Remainder operator
Equality and Relational Operators:
== Equal to
!= Not equal to
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
6. Conditional Operators:
&& Conditional-AND
|| Conditional-OR
Make your hands dirty by practicing above concepts through code:
Sample 1:
Create another class ‘Test1’ in you ‘mypackage’ as done in previous session. Copy and
paste below code and run to see the output
package mypackage;
public class Test1 {
public static void main (String args[]){
int a;
int b;
int c;
a = 5.45;
b=10.55;
c = a + b;
System.out.println("Sum of a and b is :: " + c);
}
}
Sample 2:
Create another class ‘Test2’ in you ‘mypackage’ as done in previous session. Copy and
paste below code and run to see the output
package mypackage;
public class Test2 {
public static void main (String args[]){
int a;
int b;
int c;
a = 5;
b=10;
c = a + b;
System.out.println("Sum of a and b is :: " + c);
}
}
Sample 3:
Create another class ‘Test3’ in you ‘mypackage’ as done in previous session. Copy and
paste below code and run to see the output
package mypackage;
7. public class Test3 {
public static void main (String args[]){
int a;
int b;
int c;
a = Testing;
b= qauser;
c = a + b;
System.out.println("Sum of a and b is :: " + c);
}
}
"We learn from failure, not from success" - Bram Stoker
8. Chapter-3 | Java Basic Concept- Part-2
Strings, which are widely used in Java programming, are a sequence of characters. In
the Java programming language, strings are objects.
The Java platform provides the String class to create and manipulate strings.
String Length:
Using this method, you can find number of characters contained in the string object
package mypackage;
public class StringLength {
public static void main(String args[]) {
String TestString = "I am learning Selenium with Java";
int len = TestString.length();
System.out.println("String Length is : " + len);
}
}
Concatenating Strings:
This returns a new string that is string1 with string2 added to it at the end.
package mypackage;
public class StringConcat {
public static void main(String args[]) {
String String1 = "Selenium with ";
String String2 = "Java";
String String3 = String1 + String2;
System.out.println("Final string after concatination method-1 is :: " + String3);
// Another way of doing what we have done above
String String4 = String1.concat(String2);
System.out.println("Final string after concatination method-2 is :: " + String4);
}
}
IndexOf:
Returns the index within this string of the first occurrence of the specified substring.
package mypackage;
public class StringIndex {
9. public static void main(String args[]) {
String TestString = " Learning Selenium from Selenium Community";
int Index = TestString.indexOf("Selenium");
System.out.println("Index of Selenium in above string : " + Index);
}
}
LastIndexOf:
Returns the index within this string of the last occurrence of the specified substring.
package mypackage;
public class StringLastIndex {
public static void main(String args[]) {
String TestString = "Learning Selenium from Selenium Community";
int FirstIndex = TestString.indexOf("Selenium");
System.out.println("First Index of Selenium in above string : " + FirstIndex);
int LastIndex = TestString.lastIndexOf("Selenium");
System.out.println("Last Index of Selenium in above string : " + LastIndex);
}
}
Split:
Splits this string around matches of the given regular expression.
package mypackage;
public class StringSpliting {
public static void main(String args[]) {
String TestString = "Your Booking Reference Number is 234567891";
String[] StringParts = TestString.split(" ");
System.out.println("Reference Number in above string : " + StringParts[5]);
}
}
SubString:
Returns a string that is a substring of this string. The substring begins with the character
at the specified index and extends to the end of this string.
package mypackage;
10. public class SubString {
public static void main(String args[]) {
String TestString = "Your Booking Reference Number is 234567891";
int FirstIndex = TestString.indexOf("is");
String StringParts = TestString.substring(FirstIndex + 3);
System.out.println("Sub string i.e. Reference Number in above string :
" + StringParts);
}
}
Replace:
Replaces each substring of this string that matches the literal target sequence with the
specified literal replacement sequence.
package mypackage;
public class StringReplace {
public static void main(String args[]) {
String TestString = "Your Booking Reference Number is 234567891";
String ReplacedString = TestString.replace("Your", "Customer");
System.out.println("Initial String:: " + TestString);
System.out.println("Replaced String:: " + ReplacedString);
}
}
Lower/UpperCase:
Converts all of the characters in this String to Lower / Upper case
package mypackage;
public class StringUpperLowerCase {
public static void main(String args[]) {
String TestString = "Your Booking Reference Number is 234567891";
String StringLowerCase = TestString.toLowerCase();
System.out.println("Lower Case String:: " + StringLowerCase);
String StringUpperCase = TestString.toUpperCase();
System.out.println("Upper Case String:: " + StringUpperCase);
}
}
Compare:
Compare two string either considering case sensitivity or ignoring case sensitivity.
11. package mypackage;
public class StringComparision {
public static void main(String args[]) {
String ExpectedString = "Your Booking Reference Number is 234567891";
String ActualString = "Your booking reference number is 234567891";
System.out.println("Result considering case senstivity::
" + ActualString.equals(ExpectedString));
System.out.println("Result ignoring case senstivity::
" + ActualString.equalsIgnoreCase(ExpectedString));
}
}
Trim:
Returns a string whose value is this string, with any leading and trailing whitespace
removed.
package mypackage;
public class StringTrim {
public static void main(String args[]) {
String TestString = " Your Booking Reference Number is
234567891 ";
String TrimmedString = TestString.trim();
System.out.println("Actual String:: " + TestString);
System.out.println("String after trim:: " + TrimmedString);
}
}
“Tell me and I forget, teach me and I may remember, involve me and I
learn” - Benjamin Franklin
12. Chapter-4 | A Closer Look at the "Hello World!"
In our first session we have created a program for “Hello World”. After that we have
learned few more programs related to integer and string. Now, let’s have a close look of
the very first program that has been created to test the Java, Eclipse set-up and
configuration.
package mypackage;
public class MyClass {
public static void main (String args[]){
System.out.println("Hello World !!");
}
}
When you will have a closure look of the above program. You will find following:
§ Package
§ Class
§ Main Method
§ Source Code
Package:
Our program is starting with a package statement [package mypackage;]. Package can
be defined as a grouping of related types (classes, interfaces, enumerations and
annotations) providing access protection and name space management. When you
create a Class file system automatically create a default package. But it is always
suggested not to use the default package and create a package of your own.
Class:
Every package has Class in it e.g. [public class MyClass]. Every class has a class body
(the area between the braces) contains all the code that provides for the life cycle of the
objects created from the class.
Class can be defined as a template/blue print that describes the behaviors/states that
object of its type support. In general, class declarations can include these components,
in order:
1. Modifiers such as public, private, and a number of others that you will encounter
later.
2. The class name, with the initial letter capitalized by convention.
3. The class body, surrounded by braces, {}.
Main Method:
In the Java programming language, every application must contain a main method whose
signature is:
13. public static void main(String[] args)
§ The main method accepts a single argument: an array of elements of type String
i.e. String[] args
§ This array is the mechanism through which the runtime system passes information
to your application
Source Code:
System.out.println("Hello World !!");
Let's look at the components of this line:
§ System tells the system to do something.
§ out tells the system that we are going to do some output stuff.
§ println stands for "print line," so we are telling the system to print a line in the
output.
§ The parentheses around ("Hello World.") means that the method
System.out.println() takes in a parameter, which, in this case, is the String "Hello
World."
Note that there are some rules in Java that we have to adhere to:
§ You must always add a semicolon at the end of every line.
§ Java is case sensitive, so you must write method names, variable names, and
class names in the correct case or you will get an error.
§ Blocks of code specific to a certain method or loop are encased between curly
brackets.
Access Level Modifier:
Access level modifiers determine whether other classes can use a particular field or
invoke a particular method. There are two levels of access control:
At the top level—public, or package-private (no explicit modifier).
At the member level—public, private, protected, or package-private (no explicit modifier).
A class may be declared with the modifier public, in which case that class is visible to all
classes everywhere. Also, class always has access to its own members.
“Teaching is only demonstrating that it is possible. Learning is making it possible
for yourself” - Paulo Coelho
14. Chapter-5 | A Closer Look at Function
In Java, all function definitions must be inside classes. We also call functions methods.
Let's look at an example method:
package mypackage;
public class Functions {
public static void FunctionWithoutParam(){
String String1 = "How to Learn Selenium?";
System.out.println("Ques: ".concat(String1));
}
public static void FunctionWithParam(String sQuestion){
System.out.println("Ques: ".concat(sQuestion));
}
public static void main (String args[]){
FunctionWithoutParam();
FunctionWithParam("How to Learn Java?");
}
}
• Static means this method belongs to the class Functions and not to a specific instance
of Functions
• void means this method doesn't return a value. Methods can return a single value in Java
and it has to be defined in the method declaration. However, you can use return by itself
to exit the method.
• First method doesn't get any arguments, but of course Java methods can get arguments
as we'll which is shown in second method.
• Non static methods in Java are used more than static methods. Those methods can only
be run on objects and not on the whole class.
Calling one function in another function within same class:
package mypackage;
public class FunctionCalling {
public static void CalledFunctionWithoutParam(){
System.out.println("Calledfunction will be called by calling function");
}
15. public static void CalledFunctionWithParam(String sArgument){
System.out.println(sArgument);
}
public static void CallingFunction(){
CalledFunctionWithoutParam();
CalledFunctionWithParam("Argument to be passed in the called function");
}
public static void main (String args[]){
CallingFunction();
}
}
Let’s have a close look of the above example. In above example we have
a class FunctionCalling which contains 3 simple methods/function and 1 main
method/function. Since java program should have at least 1 main method which is the
execution point.
Wehave 2 methods/functioni.e. CalledFunctionWithoutParam and CalledFunctionWi
thParam. First one will not accept any argument while second function will accept an
argument. Both these functions/method are called function which mean they will be called
by the 3 function i.e. CallingFunction.
Calling one function in another function within another class:
We are going to create 2 classes
CalledClass:
This class will have 2 functions/methods
i.e. CalledFunctionWithoutParam & CalledFunctionWithParam
package mypackage;
public class CalledClass {
public void CalledFunctionWithoutParam(){
System.out.println("Function from another class to be called");
}
public void CalledFunctionWithParam(String sArgument){
System.out.println(sArgument);
}
}
16. CallingClass:
This class will have a calling function/method i.e. CallingFunction and Main method.
package mypackage;
public class CallingClass {
static CalledClass CalledFunctionClass = new CalledClass();
public static void CallingFunction(){
CalledFunctionClass.CalledFunctionWithoutParam();
CalledFunctionClass.CalledFunctionWithParam("Argument to be passed in the
called function form another class");
}
public static void main (String args[]){
CallingFunction();
}
}
Observation:
• We cannot call the function just by providing the name of the calling function in called
function as we were doing while calling a function within same class
• When you are calling a function from another class then you will have to create an
instance of the class from where you are calling the function.
• This is done using the
statement static CalledClass CalledFunctionClass = new CalledClass();
• Now using the object instance i.e. CalledFunctionClass we can call the function with that
class
i.e. CalledFunctionClass.CalledFunctionWithoutParam(); CalledFunctionClass.Cal
ledFunctionWithParam("Argument to be passed in the called function form another
class");
• CallingFunction method is a static method so when we are creating an instance
of called class, we are declaring it asstatic else you won’t be able to call as calling
method is a static method.
“The beautiful thing about learning is nobody can take it away from you” - B.B.
King
17. Chapter-6 | Control Flow Statements
The if-then Statement:
The if-then statement is the most basic of all the control flow statements. It tells your
program to execute a certain section of code only if a particular test evaluates to true e.g.
package mypackage;
public class IfThenStatement {
public static void main(String args[]){
String AutomationTool = "QTP";
if (AutomationTool.equalsIgnoreCase("QTP")){
System.out.println("Automation tool has it's own Object Repository");
}
if(AutomationTool.equalsIgnoreCase("RFT")){
System.out.println("This is not going to be printed on console");
}
}
}
The if-then-else Statement:
The if-then-else statement provides a secondary path of execution when an "if" clause
evaluates to false.
package mypackage;
public class IfThenStatement {
public static void main(String args[]){
String AutomationTool = "QTP";
if (AutomationTool.equalsIgnoreCase("RFT")){
System.out.println("This is not going to be printed on console");
}
else{
System.out.println("Automation tool has it's own Object Repository");
}
}
}
The for Statement:
The for statement provides a compact way to iterate over a range of values. Programmers
often refer to it as the "for loop" because of the way in which it repeatedly loops until a
particular condition is satisfied. The general form of the for statement can be expressed
as follows:
for (initialization; termination;
18. increment) {
statement(s)
}
When using this version of the for statement, keep in mind that:
• The initialization expression initializes the loop; it's executed once, as the loop begins.
• When the termination expression evaluates to false, the loop terminates.
• The increment expression is invoked after each iteration through the loop; it is perfectly
acceptable for this expression to increment or decrement a value.
The following program, ForLoop, uses the general form of the for statement to print the
numbers 1 through 10 to standard output:
package mypackage;
public class ForLoop {
public static void main(String[] args){
for(int i=1; i<11; i++){
System.out.println("Count is: " + i);
}
}
}
The switch Statement:
Unlike if-then and if-then-else statements, the switch statement can have a number of
possible execution paths. A switch works with the byte, short, char, and int primitive data
types. It also works with enumerated types (discussed in Enum Types), the String class,
and a few special classes that wrap certain primitive types: Character, Byte, Short,
and Integer (discussed in Numbers and Strings).
The following code example, SwitchDemo, declares an int named month whose value
represents a month. The code displays the name of the month, based on the value
of month, using the switch statement.
package mypackage;
public class SwitchDemo {
public static void main(String[] args) {
int month = 8;
String monthString;
switch (month) {
case 1: monthString = "January";
break;
case 2: monthString = "February";
break;
19. case 3: monthString = "March";
break;
case 4: monthString = "April";
break;
case 5: monthString = "May";
break;
case 6: monthString = "June";
break;
case 7: monthString = "July";
break;
case 8: monthString = "August";
break;
case 9: monthString = "September";
break;
case 10: monthString = "October";
break;
case 11: monthString = "November";
break;
case 12: monthString = "December";
break;
default: monthString = "Invalid month";
break;
}
System.out.println(monthString);
}
}
"Any fool can know. The point is to understand" - Albert Einstein
20. Chapter-7 | File Input Output Operations
Create a file in Java:
The File.createNewFile() method is used to create a file in Java, and return
a boolean value : true if the file is created successful; false if the file is already exists or
the operation failed.
package mypackage;
import java.io.File;
public class CreateFile {
public static void main(String[] args) {
try {
File file = new File("src/newfile.txt");
if (file.createNewFile()) {
System.out.println("File is created!");
} else {
System.out.println("File already exists.");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Note: You can use the same function to create a .json and .properties file. These file
types are mostly used for the automation to accept input or write output.
Write to file using BufferedWriter:
In Java, BufferedWriter is a character streams class to handle the character data. Unlike
bytes stream (convert data into bytes), you can just write the strings, arrays or characters
data directly to file e.g.
package mypackage;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
public class WriteFileBufferedStream {
public static void main(String[] args) {
try {
String content = "This is the content to write into file";
File file = new File("src/newfile.txt");
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write(content);
21. bw.close();
System.out.println("Done");
} catch (Exception e) {
e.printStackTrace();
}
}
}
Append to file using BufferedWriter:
package mypackage;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.PrintWriter;
public class AppendFileBufferedStream {
public static void main(String[] args) {
try(FileWriter fw = new FileWriter("src/newfile.txt", true);
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter out = new PrintWriter(bw))
{
out.println("the text");
//more code
out.println("more text");
//more code
} catch (Exception e) {
System.out.println(e);
}
}
}
How to READ file in Java – BufferedReader
In Java, there are many ways to read a file, here we show you how to use the simplest
and most common-used method –BufferedReader.
package mypackage;
import java.io.BufferedReader;
import java.io.FileReader;
public class ReadFileBufferedReader {
public static void main(String[] args) {
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader("src/newfile.txt"));
22. while ((sCurrentLine = br.readLine()) != null) {
System.out.println(sCurrentLine);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
"In learning you will teach, and in teaching you will learn" - Phil Collins
23. Chapter-8 | First Selenium Program
We have learnt and practiced good enough concepts that are required for creating
automated test script using Selenium. In our first selenium script we are not going to use
all the concepts but as we advance further those concepts will be required very frequently.
To create our first automated script using selenium we further need to download and
configure selenium-server jar. Follow the steps below for set-up and configuration:
Step-1:
Create a ‘jars’ folder inside your project folder i.e.’HelloWorld’
Step-2:
Download selenium standalone server from following location:
http://www.seleniumhq.org/download/
Step-3:
Copy downloaded Selenium Standalone Server into your ‘jars’ folder created in step-1
Step-4:
Mouse Right click on your project folder ‘HelloWorld’ in Eclipse and click
on ‘Refresh’ option
Step-5:
You will see ‘jars’ folder and selenium standalone server inside it in ‘Package
Explorer’ pane of Eclipse
Step-6:
Mouse Right click on your project folder ‘HelloWorld’ in Eclipse again and perform
following steps:
§ Click on Build Path à Configure Build Path
§ Click on ‘Add External Jars’ button on ‘Properties for HelloWorld’ model
opened
§ Navigate to ‘jars’ folder and select ‘Selenium Standalone Server’ jar
§ Click on ‘Open’ button
§ Click on ‘Apply’ button
Step-7:
Download ‘geckodriver.exe’ from following location and copy it into your ‘jars’ folder
https://github.com/mozilla/geckodriver/releases
Step-8:
Make sure that you have the latest version of Firefox browser i.e. 49.0 or above
Step-9:
24. Create one class ‘FirstSeleniumProgram’ in ‘mypackage’
Step-10:
Copy and paste the following code for execution on Firefox browser:
package mypackage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class FirstSeleniumProgram {
public static void main(String args[]) throws InterruptedException{
System.setProperty("webdriver.gecko.driver","jars/geckodriver.exe");
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver driver;
try{
driver = new FirefoxDriver(capabilities);
driver.get("https://accounts.google.com/SignUp?");
driver.findElement(By.id("FirstName")).sendKeys("test");
driver.findElement(By.id("LastName")).sendKeys("user");
driver.close();
}
catch(Exception e){
System.out.println(e);
}
}
}
Step-11:
Click on ‘Run’ icon from eclipse to run your first selenium program
Execution:
This program will launch the Firefox browser, open the Gmail sign-up page and enter text
as ‘test’ in First name text field and ‘user’ in Last name text field.
Change Required for Execution on Chrome:
Step-1:
Create one class ‘SecondSeleniumProgram’ in ‘mypackage’
Step-2:
Download ‘chromedriver.exe’ from the following location and copy it your ‘jars’ folder
http://chromedriver.storage.googleapis.com/index.html?path=2.24/
Step-3:
Copy and paste the following code for execution on Chrome browser:
25. package mypackage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class SecondSeleniumProgram {
public static void main(String args[]) throws InterruptedException{
System.setProperty("webdriver.chrome.driver", "jars/chromedriver.exe");
DesiredCapabilities capabilities=DesiredCapabilities.chrome();
WebDriver driver;
try{
driver = new ChromeDriver(capabilities);
driver.get("https://accounts.google.com/SignUp?");
driver.findElement(By.id("FirstName")).sendKeys("test");
driver.findElement(By.id("LastName")).sendKeys("user");
driver.close();
}
catch(Exception e){
System.out.println(e);
}
}
}
Step-4:
Click on ‘Run’ icon from eclipse to run your first selenium program
Change Required for Execution on Internet Explorer:
Step-1:
Create one class ‘ThirdSeleniumProgram’ in ‘mypackage’
Step-2:
Download ‘IEDriverServer.exe’ from the following location and copy it your ‘jars’ folder
http://www.seleniumhq.org/download/
Step-3:
Copy and paste the following code for execution on IE browser:
package mypackage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class ThirdSeleniumProgram {
public static void main(String args[]) throws InterruptedException{
System.setProperty("webdriver.ie.driver", "jars/IEDriverServer.exe");
26. DesiredCapabilities capabilities=DesiredCapabilities.internetExplorer();
WebDriver driver;
try{
driver = new InternetExplorerDriver(capabilities);
driver.get("https://accounts.google.com/SignUp?");
driver.findElement(By.id("FirstName")).sendKeys("test");
driver.findElement(By.id("LastName")).sendKeys("user");
driver.close();
}
catch(Exception e){
System.out.println(e);
}
}
}
Step-4:
Check that Protected Mode settings for each zone to be the same value using following
step
Settings Internet Options Security Internet/Local Intranet/Trusted
sites/Restricted sites
Check or Uncheck ‘Enable Protected Mode’ checkbox for all the zones
Step-5:
Set Zoom level to 100%
Step-6:
Click on ‘Run’ icon from eclipse to run your first selenium program
Note: For execution on IE-11 please refer settings mentioned on selenium website
“Logic will get you from A to B. Imagination will take you everywhere” - Albert
Einstein
27. Chapter-9 | A Closer Look at First Selenium Program
In this session we are going to discuss more about what we have written in our first
Selenium Program using java to understand it in a better.
public class FirstSeleniumProgram {
public static void main(String args[]) throws InterruptedException{
System.setProperty("webdriver.gecko.driver","jars/geckodriver.exe");
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver driver;
WebElement element;
try{
driver = new FirefoxDriver(capabilities);
driver.get("https://accounts.google.com/SignUp?");
element = driver.findElement(By.id("FirstName"));
element.sendKeys("test");
element = driver.findElement(By.id("LastName"));
element.sendKeys("user");
driver.close();
}
catch(Exception e){
System.out.println(e);
}
}
}
System.setProperty("webdriver.gecko.driver","jars/geckodriver.exe");
We need geckodriver.exe for Firefox, IEDriverServer.exe for Internet Explorer and
chromeDriver.exe for chrome browser. This .exe contains implementation of WebDriver
wire protocol which is used for communication with Selenium Server to interpret and
perform action accordingly.
Every browser has its own rendering engine and mechanism so; we need separate .exe
or implementation for each browser. In above statement we are providing the path of
these exe that will be help Selenium Server/ WebDriver to identify the object on browser
and perform operation as per WebDriver wire protocol.
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
Desired capabilities are used by WebDriver to set/configure the browsers to be used. It
is always define in Key/Value pair (JSON format) e.g. browserName, version, platform
etc.
WebDriver driver;
28. In the above statement we are creating an object instance of WebDriver which will act as
a handle for the browser.
WebElement element;
In the above statement we are creating an object instance of WebElement which will hold
the value of the web page object like text field, button, text etc.
driver = new FirefoxDriver(capabilities);
In the above statement we are initializing the driver with Firefox driver and given
capabilities (given properties). This will work as a handle to the browser and will be user
further to perform any action/operation on the opened browser.
driver.get("https://accounts.google.com/SignUp?");
In the above statement we are using the function ‘get’ of class driver to open the
application URL.
element = driver.findElement(By.id("FirstName"));
In the above statement we are identifying the element using findElement function
providing the Object properties i.e. id in this case and its value i.e. FirstName. Also
assigning this to an element class element which will be used later to perform action.
element.sendKeys("test");
In the above statement we providing text as “test” in the text field that has been identified
in the above step using the locator (Object Properties and its value i.e. id=FirstName).
driver.close();
In the above statement we are closing the browser handle that has been initiated in the
statement driver = new FirefoxDriver(capabilities);
Note:
element = driver.findElement(By.id("FirstName"));
element.sendKeys("test");
element = driver.findElement(By.id("LastName"));
element.sendKeys("user");
We keep assigning the element with the page objects properties to identify the
element/object uniquely to perform action on it. In the above statements we have first
assigned the element with First Name properties to identify the text field for First name
and then performed enter operation on it. After that we have reassigned the element with
Last Name properties to identify the text field for Last name and then performed enter
operation on it. We will keep doing that for various element on which we will have to
perform any kind of operation/action.
“Live as if you were to die tomorrow. Learn as if you were to live forever”- Mahatma
Gandhi
29. Chapter-10 | Identifying Objects Uniquely
In Introduction we have discussed that all the functional automation tools are object
based. Every automation tool/api provide some or the other kind of mechanism to identify
the elements/objects on the webpage uniquely. WebDriver also provide many ways to
identify the elements/objects using its properties defined in the html code. These
properties and its value are called as “Locators” in selenium/WebDriver.
Following are the most commonly used locators in WebDriver:
§ ID
§ CSS
§ XPATH
§ Link Text
Note:
WebDriver provided more then dozens of locators to identify the elements/object on any
web page but in real world above three are most commonly used.
How to look for the object properties defined in html code of your browser?
Step-1:
Open https://accounts.google.com/SignUp? in your browser i.e. Firefox/chrome/IE
Step-2:
Right mouse click on the First name text field and click on “Inspect element” option
Step-3
Developer’s tool will be opened at the bottom having html code highlighted for the First
name text field which will look like below screenshot:
Step-4:
Html code highlighted in BLUE color contains the properties defined for the first name
text field. Now we will have to use these properties only to identify the text field for first
name uniquely.
Let’s have a closure look of the locators and how to compose it.
ID:
ID or Identifier is the most reliable locator for any object on a web page. It is always unique
for every element/object but, sometime developers do not provide ID for all the
elements/objects so, we will have to use other locator type. Also, ID is categories into
following 2 categories:
30. Static ID:
Static ID as shown in the above screenshot does not change with the session. It will
remain same every time you open the page. These are most suitable to be used as it is.
Dynamic ID:
Dynamic ID is created at the runtime and contains some numbers mostly. It always
changes with the session so, whenever you will open the page you will get a different ID
value. These ID are not suitable to be used for locating/identifying the element/objects.
Note:
Always use static ID only for identifying the element/object uniquely. Else, use CSS or
XPATH to for object identification.
CSS:
CSS stands for Cascading Style Sheets and it describes how HTML elements are to be
displayed on screen. To locate/identify the element/object using CSS you will have to use
the object properties to compose the CSS locator.
Following is the simplest way of creating a CSS locator for the First name text field for
which we have the html code in the screenshot:
CSS = TagName/Node[property=’property value’]
Here
§ Tag Name/Node = input
§ Property = id or name
§ Property value = FirstName or FirstName
So CSS locator that can be easily created using the properties of the First Name text
field are:
§ CSS = input [id=’FirstName’]
§ CSS = input [name = ‘FirstName’]
Note:
We will cover more about CSS selector locator in another chapter where we will learn few
advance technique that can be used to create CSS locator
XPATH:
XPATH is a query language that is used to traverse through the DOM (Document Object
Model). In a simple language you can say that XTAPH locator identify element by traverse
through the DOM structure/HTML code. XPATH can be categories into following 2
categories:
Absolute XPATH:
§ Absolute xpath locator start with ‘/’ (Single Slash)
§ It uses Complete path from the Root Element to the desire element
§ Absolute XPATH are generally very long
31. § It provides the exact location of the element/object on the html page
§ It is more fragile than relative XPATH as minor change in the DOM structure will
break it
Relative XPATH:
§ Relative XPATH starts with ‘.//’ (dot followed by 2 slashes)
§ Relative XPATH starts from a parent node generally having id defined
§ Relative XPATH are shorter
§ It is less fragile as until the parent node is not changed it works perfectly
§ Relative XPATH is a bit slower than absolute XPATH
§ Relative XPATH is mostly used in Selenium for object identification
Signature of Relative XPATH is:
//TagName/Node[@property=’property value’]
e.g.
//input[@id=’FirstName’] or //input[@name=’FirstName’]
Absolute XPATH for FirstName is:
/html/body/div/div[2]/div/div/div/form/div/fieldset/label/input
Note:
We will cover more about XPATH locator in another chapter where we will learn few
advance techniques that can be used to create XPATH locator
Link Text:
Link Text is mainly used for the links only. It is the easiest way to identify the link by its
link label. In case you are not able to identify any link using Link Text or you have multiple
link with the same label then you can always switch for CSS or XPATH locator.
“If you can't explain it simply, you don't understand it well enough” - Albert
Einstein
32. Chapter-11 | Advance Technique to Compose CSS and
XPATH locator
In our previous session we have covered the simplest way of composing CSS and XPATH
to identify the element/object on the web page. In this session we are going to learn some
advance technique to compose CSS and XPATH. Also, this session will be more like a
practice session to make sure that we have good enough understanding of CSS and
XPATH to identify the element/object uniquely. Object identification is the building block
for the automation tool.
Selenium IDE a plugin for Firefox browser can be best used for validating that the CSS
Locator or XPATH locator that has been composed for any element/object is identifying
the element/object correctly or not. There are other plugins also available for Firefox,
chrome and IE but, I prefer to use selenium IDE as I have never faced any issue once I
have validated my locator with Selenium IDE.
Validating Locator using Selenium IDE:
Step-1: Open https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/ in Firefox
browser
Step-2: Click on Add to firefox button and Selenium IDE is installed as a firefox plugin
Step-3: Open https://accounts.google.com/SignUp in firefox browser
Step-4: Open selenium IDE Tools Selenium IDE
Step-5: Click in the table area to that will highlight the ‘Command’,
‘Target’ and ‘Value’ field and enable ‘Select’ & ‘Find’button.
Step-6: In ‘Target’ field copy css=input[id='FirstName']
Step-7: Click on find button and you will see a green border appears around the
FirstName text field and it is filled with yellow color for fraction of second. It means that
the CSS locator is able to identify the element/object uniquely.
Next we are going to use other advance technique to compose CSS locator for
identification of few other element/object on this page. We will copy and paste it in
Selenium IDE to validate that the CSS locator created is working perfectly.
CSS
#id: Selects the element with id="FirstName"
• css=#FirstName
element1~element2: Selects every <input> element that are preceded by a <strong>
element
• css=strong ~ input
33. element+element: Selects all <input> elements that are placed immediately after
<strong> elements
• css=strong + input
[attribute=value]: Selects all elements with name="FirstName"
• css=[name="FirstName"]
element>element: Selects all <p> elements where the parent is a <div> element
• css=label[id="firstname-label"]>input
:nth-of-type(n): Selects every <p> element that is the second <p> element of its parent
• css=fieldset>label:nth-of-type(1)>input
:nth-last-of-type(n): Selects every <p> element that is the second <p> element of its
parent, counting from the last child
• css=fieldset>label:nth-last-of-type(2)>input
:nth-child(n): Selects every <p> element that is the second child of its parent
• css=label[id='firstname-label']>input:nth-child(2)
:only-of-type: Selects every <p> element that is the only <p> element of its parent
• css=label>input:only-of-type
XPATH:
Unique ID: Selects the element with unique ID FirstName
• xpath=//input[@id='FirstName']
child::input: Selects the first input child of the element with unique ID firstname-label
• xpath=//label[@id='firstname-label']/child::input[1]
descendant:: input: Selects the input element descendants of the context node
• xpath=//label[@id='firstname-label']/descendant::input
ancestor-or-self::input: Selects the input ancestors of the context node and, if the
context node is a input element, the context node as well
34. • xpath=//*[@id='FirstName']/ ancestor-or-self::input
ancestor::label: Selects all label ancestors of the context node
• xpath=//input[@id='FirstName']/ancestor::label
descendant-or-self::input: Selects the input element descendants of the context node
and, if the context node is a para element, the context node as well
• xpath=//*[@id='firstname-label']/descendant-or-self::input
self::input: Selects the context node if it is a input element, and otherwise selects
nothing
• xpath=//input[@id='FirstName']/self::input
descendant::input: Selects the input element descendants of the chapter element
children of the context node
• xpath=//fieldset/child::label/descendant::input
child::*/child::input: Selects all input grandchildren of the context node
• xpath=//fieldset/child::*/child::input
child::input[last()]: Selects the last input child of the context node
• xpath=//label[@id='firstname-label']/child::input[last()]
following-sibling::label[1]: Selects the next input sibling of the context node
• xpath=//label[@id='firstname-label']/following-sibling::label[1]/input
preceding-sibling::label[1]/: Selects the previous input sibling of the context node
• xpath=//label[@id='lastname-label']/preceding-sibling::label[1]/input
“A wise man can learn more from a foolish question than a fool can learn from a
wise answer” - Bruce Lee