00:00 🌐 Key takeaways about Selenium:
- Selenium is a third-party library for automating web browsers using Java.
02:05 🕹️ Key takeaways about Selenium components:
- Selenium is divided into four components: IDE, RC (deprecated), WebDriver, and Grid.
- Selenium WebDriver is the most widely used component, with Selenium 4 being the latest version.
06:16 🛡️ Key takeaways about Selenium’s advantages:
- Selenium is open source, meaning its source code is visible and can be customized by anyone.
- It is completely free to use and provides cross-browser and cross-platform support.
- Selenium offers support for multiple programming languages, making it highly versatile.
- Selenium is w3c Webdriver compliant, ensuring standardization and trustworthiness in automation.
16:28 🚫 Key takeaways about Selenium’s limitations:
- Selenium can only automate web applications, not desktop applications or mobile native apps.
- It does not perform API automation.
- Selenium does not generate test results or reports by itself.
- Selenium is not suitable for performance testing or verifying security issues in applications.
24:07 🛠️ Pros and Cons of Selenium
- Selenium can be integrated with third-party tools or libraries for additional features.
- Selenium can handle various tasks like taking screenshots, scrolling, and handling pop-ups.
- Selenium cannot automate tasks related to captchas, barcodes, QR codes, or email inboxes due to security reasons.
30:10 📦 Setting up Selenium with Maven in Eclipse
- Create a Maven project in Eclipse to manage project dependencies and configurations.
- Add Selenium Maven dependency to your project’s
pom.xmlfile to include Selenium libraries.
- Configure the project to use JDK 1.8 to ensure compatibility with Selenium.
45:02 ⚙️ Configuring JDK and Maven Properties
- Add properties in the
pom.xmlfile to specify the Java compiler version (1.8) and character encoding.
- Update the Maven project in Eclipse to apply the changes and ensure compatibility with JDK 1.8.
This section of the video discusses the pros and cons of Selenium, setting up Selenium with Maven in Eclipse, and configuring JDK and Maven properties to ensure proper compatibility.
47:10 🌐 Setting up a Maven project for Selenium,
- Explaining how to set up a Maven project for Selenium.
47:52 🌐 Choosing the folder to write code in,
- Discussing where to write code in a Maven project, specifically in the “SRC main Java” folder.
52:01 🌐 Creating an object of the Chrome driver class,
- Demonstrating how to create a Chrome driver object for browser automation.
56:11 🌐 Importance of including the protocol in the URL,
- Emphasizing the need to include the protocol (HTTP/HTTPS) when entering a URL.
59:57 🌐 Validating the page title,
- Discussing the importance of validating the page title after opening a URL.
01:07:58 🌐 Introduction to top casting and the WebDriver interface,
- Introducing the concept of top casting with the WebDriver interface for cross-browser testing.
00:00 🚀 Explanation of cross-browser logic with switch case and default case,
- Assignment: Convert cross-browser logic with switch case, open Amazon or Facebook, capture title, and check if it contains “Amazon.”
01:17:09 🛠️ Maven’s role in managing project dependencies and updating project,
- Demonstrated fixing a Maven issue with a warning.
01:25:08 💡 Maven’s importance in simplifying dependency management,
- Explained how Maven streamlines the process of managing dependencies.
01:26:05 🌐 Maven as a build automation tool and project configuration manager,
- Highlighted Maven’s role in automating project configuration and managing dependencies.
01:31:18 📝 Assignment explanation: Implementing cross-browser logic with switch case and validating the title.
- Assignment details reiterated for clarity.
01:39:51 🔧 Troubleshooting Chrome driver version mismatch issue and solution,
- Provided guidance on resolving a Chrome driver version mismatch problem and checking for background processes.
01:40:46 💡 Explanation of using system.setProperty and handling Chrome driver versions,
- Clarified the process of setting up the system property to address Chrome driver version issues.
00:01 📦 Selenium WebDriver architecture includes client scripting, a Selenium server, and browser binaries.
- Selenium architecture comprises client scripting, server interaction, and browser binaries.
- Selenium allows client scripts in various programming languages to communicate with browsers via a server.
01:10 🖥️ Selenium’s ability to interact with various browsers is facilitated by browser binaries.
- Browser binaries, like Chrome driver.exe or Gecko driver.exe, enable Selenium to interact with specific browsers.
- Browser vendors, such as Google and Mozilla, are responsible for providing these binaries.
16:35 ⚙️ Selenium version 4.6.0 and above do not require explicit configuration of browser binaries.
- Starting from Selenium version 4.6.0, you no longer need to configure browser binaries.
- Prior to version 4.6.0, setting up browser binaries using system properties was necessary for Selenium to work properly.
23:47 🕵️♂️ Configuring browser binaries involves setting system properties in Selenium code.
- Configuring browser binaries in Selenium code requires setting system properties.
- The key for Chrome driver is “Webdriver.Chrome.driver,” and the value is the path to the downloaded Chrome driver.exe file.
24:28 ⚙️ Setting up ChromeDriver Path
- To use ChromeDriver with Selenium, you need to set up the path to the ChromeDriver executable.
30:36 📦 Selenium Manager for Binary Management
- Selenium Manager, introduced in Selenium 4.6.0, handles the automatic management of binary files like ChromeDriver, making it easier to keep them up-to-date and compatible with your browser version.
37:11 🧩 Selenium’s Class Hierarchy
- Selenium has a class hierarchy with Webdriver as the main interface, and it extends SearchContext.
- RemoteWebDriver, FirefoxDriver, ChromeDriver, etc., implement the methods defined in the Webdriver interface.
45:10 🚀 Exploring Selenium’s Source Code
- To understand the inner workings of Selenium, you can explore its source code on the official GitHub repository.
- Webdriver interface extends SearchContext, and the methods defined in it are overridden in Webdriver and its implementations like RemoteWebDriver.
- This division provides a clear breakdown of the key topics discussed in the video, along with their timestamps for easy reference.
49:16 🖥️ Understanding Selenium WebDriver Architecture
- Selenium WebDriver architecture includes client scripting, a Selenium server, and browser binaries.
50:00 🚀 Remote WebDriver Implementation
- Remote WebDriver class is responsible for implementing the WebDriver interface.
51:53 🌐 Chromium and Edge Drivers
- Chromium-based browsers like Edge and Chrome extend the Chromium driver, creating separate classes for these browsers.
53:32 🔗 Hierarchy of WebDriver Classes
- Understanding the hierarchy of WebDriver classes, including remote WebDriver, Chromium driver, and browser-specific drivers.
56:01 ⚙️ Top Casting Options
- Exploring various top casting options in Selenium, including those between different WebDriver classes and interfaces.
01:06:28 🌐 Remote WebDriver for Remote Execution
- The remote WebDriver is used for remote execution of test cases on remote machines or servers, such as with Selenium Grid.
00:16 🌐 Selenium post version 4.6.0 auto-handles system properties and offers compatibility.
- Selenium now manages system properties automatically after version 4.6.0.
01:10 🌐 Maximizing the browser window in Selenium.
- Selenium provides methods to maximize the browser window.
- driver.manage().window().maximize() is used for maximizing.
- driver.manage().window().fullscreen() can be used for fullscreen mode.
03:44 🌐 Clearing cookies in Selenium for a clean session.
- Clearing cookies in Selenium ensures a fresh session.
- Use driver.manage().deleteAllCookies() to delete all cookies.
05:07 🌐 Getting the current URL in Selenium.
driver.getCurrentUrl()returns the current URL as a string.
- You can use this method to validate the URL during testing.
07:08 🌐 Understanding the builder pattern in Selenium.
driver.manage()methods do not follow the builder pattern.
- Builder pattern methods return the same class object.
08:41 🌐 Retrieving page source in Selenium.
- You can use
driver.getPageSource()to get the complete page source.
- This can be used to verify specific content in the page source.
10:59 🌐 Quitting and closing the browser in Selenium.
driver.close()to close the browser.
- Understand the difference between quitting and closing the browser.
19:29 🌐 Creating a utility class for browser automation.
- Creating a utility class to avoid repetitive code in browser automation.
- Utilizing encapsulation and providing proper documentation for utility methods.
23:42 🌐 Validating URL format in a utility class.
- Ensuring the URL format begins with “https://” in the utility class.
- Using methods like
indexOfto validate the URL format.
25:47 🌐 Creating Custom Utility Methods in Selenium
- Custom utility methods enhance Selenium functionality.
- The example demonstrates utility methods for initializing the driver, launching a URL, getting the page title, and closing the browser.
41:59 💡 Reusability of Utility Methods in Selenium
- The reusability of utility methods allows for easy and efficient automation of different web applications.
- Utility methods can be used across various test cases without duplicating code.
48:14 📜 Difference Between
close in Selenium with Session IDs
- The session ID (SID) is a unique identifier for communication between Selenium and the browser.
- Understanding the difference between
closein Selenium in relation to session IDs is crucial.
51:26 🧭 Understanding Synchronous and Asynchronous Requests
- Synchronous requests are processed sequentially, one by one, ensuring order.
- Asynchronous requests would lead to issues if the order is not maintained.
54:36 🔌 Handling the “No Such Session Exception” After Quit
- After calling driver.quit, the session ID becomes null.
- Attempting to use the driver again without reinitializing it will result in a “No Such Session Exception.”
01:06:21 ⚙️ Solving the “No Such Session Exception” Issue
- Reinitializing the driver by creating a new instance after calling driver.quit resolves the “No Such Session Exception” problem.
- This ensures a new session with a valid session ID is maintained.
01:12:26 🚫 Handling Invalid Session ID After driver.close
- Using driver.close still maintains the same session ID, but it becomes an “Invalid Session ID” after the browser is closed.
- Attempting to use the driver after driver.close will result in an “Invalid Session ID” error.
01:16:07 ✅ Resolving “Invalid Session ID” Issue After driver.close
- Reinitializing the driver with a new instance after calling driver.close helps resolve the “Invalid Session ID” problem.
- This ensures a new valid session ID is maintained for further interactions.
01:16:23 🤖 Understanding the differences between
driver.close in Selenium.
driver.closeboth are used to close the browser, but they have distinct behaviors in Selenium.
01:17:10 🌐 Selenium Session ID behavior in
- In both
driver.close, when you re-initialize the driver, a new session ID is created.
01:18:23 🛡️ Why you should know the differences between
- Understanding the nuances of
driver.closecan set you apart in interviews and real-time projects. It helps prevent unexpected session ID issues.
00:01 📌 Introduction to interacting with web elements
- Web elements are components on a web page, such as text fields, buttons, and images.
- Interacting with web elements involves actions like clicking, entering text, and capturing text.
01:24 📌 Understanding Locators
- Locators are used to identify web elements on a page.
- Common locators include ID, name, CSS, and more.
06:08 📌 Creating Web Elements and Performing Actions
- Two approaches to creating web elements: directly using
driver.findElementor storing web elements in variables for reusability.
- Reusable web element variables can make your code more efficient and easier to maintain.
23:53 📚 Defining variables and discussing different approaches for locating web elements.
- Discussing variable definition for email ID and password,
- Exploring three different approaches for locating elements.
27:25 🔄 Comparing the third and fourth approaches for web element location.
- Discussing the advantages of the third approach’s buy locator approach,
- Introducing the fourth approach, using a generic method for web elements.
34:55 🚀 Introducing the fifth approach with a generic method for both web elements and actions.
- Demonstrating the creation of a generic method for web elements and actions,
- Showcasing how the fifth approach reduces redundant code and simplifies web element interaction.
47:20 🔑 Overview of different approaches to locate web elements and interact with them in Selenium.
- Comparison of different methods to find and interact with web elements.
- The challenges of repetitive code when using the first approach.
48:13 🔑 Introduction to the concept of utility classes for element interactions.
- The idea of creating utility classes to handle common element interactions.
- The benefit of separating element interaction code from test scripts.
49:13 🔑 Exploring the need for a utility class to handle element interactions.
- The advantages of creating a utility class for element interactions.
- The importance of maintaining a single driver instance throughout the script.
53:06 🔑 Introduction to a more efficient approach using utility classes.
- Creating a utility class to manage element interactions.
- Demonstrating how to pass the driver instance to the utility class constructor.
56:12 🔑 Applying the utility class for efficient element interactions.
- Implementing the utility class for interacting with web elements.
- The generic nature of the utility method for send keys.
01:08:59 🔑 Utilizing utility classes in real-time automation scripts.
- Integrating browser and element utility classes to write efficient and reusable test scripts.
- Demonstrating the advantages of using utility classes for element interactions in real projects.
01:12:55 🛠️ Selenium Object Initialization and Encapsulation
- Avoid using public drivers to prevent null pointer exceptions.
- Encapsulation involves maintaining private drivers for better control.
01:13:41 🧩 Understanding Selenium Locators and Methods
- The driver.findElement method is not related to hashmaps.
- sendKeys is just a method name, not tied to hashmaps.
01:15:06 🔑 Best Practice: Use Page Object Model and Selenium 4
- It’s essential to use the Page Object Model for maintaining code efficiently.
- The Selenium 4 approach is recommended for real-time projects.
01:19:10 🕵️ Locator Consistency Across Browsers
- Locators usually remain consistent across different browsers.
- Changes in browser appearance may occur, but the underlying properties remain the same.
01:21:48 🔄 Combining Different Locator Approaches
- Combining the first and second locator approaches isn’t feasible as the locators differ.
- Filling form fields one by one is recommended in automation.
01:23:14 🌐 Browser Compatibility: Safari and Windows Limitations
- Safari can’t be used on Windows, and Edge can’t be used on macOS due to browser limitations.
- Browser compatibility depends on the operating system.
00:00 🤖 Introduction to locators and strategies for element identification,
- Discussing strategies for locating elements, such as ID and Name locators.
01:21 🕵️♀️ Name Locator,
- Explaining how to use the Name locator to identify elements.
04:39 🤓 Class Name Locator,
- Discussing the Class Name locator and its limitations.
18:42 🕵️♂️ XPath Locator,
- Introducing XPath locators and demonstrating how to copy and use them.
21:03 🕺 Using XPath for different elements,
- Utilizing XPath locators for various elements, including text input fields and buttons.
This section covers the basics of different locators in Selenium, including ID, Name, Class Name, and XPath, explaining their usage and highlighting their uniqueness for element identification. It also shows how to copy and use XPath locators for interacting with elements on a web page.
22:58 📌 Explaining the limitations of using
buy.Dot methods for locating elements in Selenium.
- Selenium provides methods for locating elements by
ID, Name, and Class.
- The presenter discusses the absence of methods for other attributes like Value and the need for XPath.
25:38 📌 Demonstrating the creation of a get element method for Selenium automation.
- The creation of a get element method for finding web elements based on a
- Emphasizing the usage of a non-static method for this utility.
26:04 📌 Creating a method for performing a click action in Selenium.
- The development of a do click method for clicking elements based on a
- The importance of using a non-static method in utility classes.
26:58 📌 Explaining the creation of a
send keys method for Selenium automation.
- The introduction of a send keys method to interact with elements based on a
- Demonstrating the use of the get element method internally within the send keys method.
30:29 📌 Discussing the reasoning behind not using static methods in utility classes.
- Addressing why static methods are not suitable for utility classes, with reference to driver utilities.
- Mentioning that the choice of using static or non-static methods depends on specific scenarios.
32:11 📌 Introducing the CSS selector as a method for locating elements in Selenium.
- Explaining the use of the CSS selector as an alternative method for element location.
- Comparing the syntax of CSS selectors to XPath and highlighting its simplicity.
35:00 📌 Differentiating between XPath and CSS as methods for locating elements.
- Highlighting that XPath and CSS should be compared as element location strategies, not with attributes like ID or Name.
- Mentioning that both XPath and CSS have their strengths and limitations, and a case study will help determine which is better.
37:24 📌 Introduction to locating links using the
link text method in Selenium.
- Describing the link text method for locating links in Selenium.
- Emphasizing the importance of recognizing the anchor (<a>) tag for identifying links.
44:45 📌 Demonstrating the usage of the buy.Dot link text method to click on a specific link.
- Using the buy.Dot link text method to locate and click on a link with the text “register.”
- Highlighting that the link text method works for links but not for all types of elements.
47:14 🔍 Locating Elements by Link Text and Partial Link Text
- Link text can be used to locate elements, but it can be duplicated.
- In case of duplicate link text, the first occurrence will be clicked.
- If an element has a unique ID, it’s preferred over link text for locating.
49:14 📝 Using Partial Link Text
- Partial Link Text is used when a part of the link’s text is unique.
- It’s helpful to avoid long and repetitive text when locating elements.
- However, it may not be suitable if there are similar links starting with the same partial text.
52:57 ⚙️ Using Tag Name as a Locator
- Tag Name locator is used to find elements based on their HTML tags.
- It’s suitable for elements like headers (H1, H2, etc.).
- It’s not unique for many elements and should be used selectively.
58:45 📚 Creating Generic Element Utilities
- A generic method, doElementGetText, is introduced to fetch text from various elements.
- The method can be used for elements with text, such as links, headers, paragraphs, and footers.
- The goal is to develop a library of reusable utility methods for working with different types of elements.
01:04:30 📝 Assignment: Form Filling and Validation
- The assignment involves filling out a registration form, clicking checkboxes and buttons, and validating the success message.
- It’s a practical exercise to apply the knowledge of locators and generic methods.
01:12:55 🧐 Tips for Real-Time Selenium Scripts
- In real-time projects, it’s essential to create utility methods to improve script readability and maintainability.
- Creating generic methods for actions like clicking, sending keys, and validating text is a good practice.
- The ultimate goal is to build a library of reusable utilities for different types of elements.
01:13:08 🤖 Understanding locator uniqueness
- Explaining the need to understand the uniqueness of locators.
01:13:24 🤖 Locating elements by class name
- Demonstrating how to locate elements by class name.
- Highlighting the issue of non-unique class names.
01:13:52 🤖 CSS locators and browser compatibility
- Discussing the universality of CSS locators across different browsers.
01:15:24 🤖 Creating utility methods for future use
- Explaining the purpose of creating utility methods for future use.
- Emphasizing the ease of maintaining and using these methods in various applications.
01:19:03 🤖 Importance of Constructor in Element Util class
- Clarifying the role of the Constructor in the Element Util class for passing the driver.
- Addressing the significance of Constructor in handling the driver object.
01:30:58 🤖 Debugging a null pointer exception
- Assisting a learner in debugging a null pointer exception in a Java program.
- Identifying and correcting a case sensitivity issue in code.
00:00 🧩 In this section, the instructor discusses the concept of element visibility in Selenium and its importance.
- The instructor explains that element visibility is crucial for verifying whether elements are present on a web page.
14:30 🧩 The instructor demonstrates how to create amethod for checking if an element is displayed on a web page.
- The instructor shows how to use the
isDisplayedmethod to determine if an element is present.
- They create a generic method for checking element visibility.
19:06 🧩 The instructor discusses what happens when an element’s locator is incorrect and how Selenium handles such situations.
- The instructor explains that when the locator is incorrect, the findElement method throws a NoSuchElementException. This exception is not an “element not found” exception; it’s called a NoSuchElementException.
24:14 🔍 Understanding the exception behavior in Selenium
- Exceptions are thrown when creating a web element, not when performing actions on it.
- Actions like click or send keys will throw exceptions if the element is not created or found.
25:13 📜 Find Element documentation and handling exceptions
findElementmethod in Selenium returns the first matching element and throws a “no such element” exception if none are found.
- Selenium doesn’t differentiate between script issues or element availability issues; it always checks for the element’s presence.
27:13 🌐 Finding total links on a web page
- A use case is presented: finding the total number of links on a web page.
findElementsmethod is introduced to retrieve multiple elements based on a locator strategy.
28:16 🧾 Capturing the total count and text of links
- The list of web elements obtained using
findElementsis stored in a variable.
- A loop is used to iterate through the list, capture the text of each link, and print the count and text to the console.
44:47 🚀 Handling empty text in web elements
- Explains that not all elements with blank text are necessarily hidden.
- Demonstrates that elements with blank text can still be considered links.
48:46 🖼️ Exploring how to handle blank links in Selenium,
- Handling blank links in a web page,
- Identifying and avoiding blank text elements in Selenium.
52:18 🔄 Using a for-each loop to process links,
- Utilizing a for-each loop to iterate through a list of web elements,
- Capturing and printing text from each link while avoiding blank text.
57:29 📝 Assignment: Counting text fields on a registration page,
- Assigning the task of counting text fields on a web page,
- Determining the number of text fields present in a registration form.
01:10:01 ❓ Discussion on handling elements before page loading,
- Clarification about how Selenium interacts with web pages,
- Understanding that Selenium interacts with elements on the loaded page, not during the page loading process.
01:14:53 🚗 Understanding the importance of image validation
- Image validation is crucial in web automation to ensure that required images are present on a page.
- Image validation should be performed before writing automation scripts to ensure that the necessary images are available.
01:16:05 🧐 Handling dynamic image content
- Selenium can check the presence of images on a page by verifying their existence based on the image file’s name.
- Even if the image content changes, as long as the file name remains the same, Selenium can validate its presence.
01:20:18 🖱️ Interaction with elements and scrolling
- Selenium primarily interacts with elements that are currently visible on the page.
- Scrolling is not usually required in Selenium, as it focuses on the visible elements, making it suitable for static pages.
01:34:11 🌐 Enabling developer options in Safari for automation
- To enable automation with Safari, you need to open Safari’s preferences, go to the Advanced tab, and check the “Show Develop menu in menu bar” option.
- Enabling the developer menu allows you to perform automation with Safari using Selenium.
01:37:05 ❌ Handling “invalid selector” exceptions
- When using an invalid selector in Selenium, it can result in an “invalid selector” exception.
- It’s essential to ensure that the selectors you use are correct to avoid such exceptions.
01:39:19 📦 Understanding static and non-static variables
- When trying to access a non-static (instance) variable like “driver” inside a static method, it results in an error.
- Private or non-private access modifiers don’t change this behavior; the issue is related to static vs. non-static context.
01:39:34 🛠️ Troubleshooting Firefox Launch Issue
- Discusses an issue with launching Firefox using Selenium.
- Suggests checking the version of the gecko driver and system.set property.
- Provides a workaround by manually setting the path for gecko driver.exe.
01:46:50 🌐 Managing Drivers and Caching
- Explains how Selenium handles driver management for Chrome.
- Highlights the lack of automatic driver management for Firefox and Edge.
- Suggests a workaround using system.set property to specify driver paths.
01:47:06 🤝 Organizing Utility Methods
- Advises reorganizing utility methods into a separate class.
- Demonstrates creating an “ElementUtil” class for common actions.
- Emphasizes keeping the Base Class focused on browser-specific tasks.
01:52:21 🚀 Updating Test Scripts for Reorganized Utilities
- Walks through updating test scripts after moving utility methods.
- Shows how to pass the driver to the Registration Page and ElementUtil classes.
- Ensures the driver is correctly initialized in the ElementUtil class.
00:00 📚 Introduction and Overview
- Introduction to the session and discussion of previous topics.
01:12 🧩 Return Types in Selenium
- Explanation of the return types of driver.findElement and driver.findElements.
- driver.findElement returns a single web element.
- driver.findElements returns a list of web elements.
02:30 🚫 Element Not Found Exception
- Clarification that there is no “Element Not Found Exception” in Selenium.
- Explanation of the exception name “NoSuchElementException.”
04:08 🔄 Iterating Through Links
- Discussion on how to iterate through links on a web page using
- Using the
By.tagName("a")locator to find all the links on the page.
06:50 🔍 Fetching Element Attributes
- Introduction to fetching element attributes like “placeholder” and “href.”
- Demonstrating the
getAttributemethod to retrieve attribute values.
12:10 🧰 Creating a Generic Method
- Creating a generic method to retrieve element attributes and making the code more efficient.
- Example of using this method to fetch attribute values from different elements.
19:44 🔗 Capturing Href Values
- Demonstrating how to capture the “href” values from links on a web page.
- Using a for loop to iterate through the links and retrieve both attribute values and text.
25:11 📊 Total Links on the Page
- Counting and printing the total number of links on the Amazon page using
48:01 📌 Capturing Specific Section Links
- You have a scenario where you need to capture links from a specific section of a web page, not the entire page.
49:27 📌 Identifying Parent-Child Elements
- To achieve this, you inspect the web page and identify the parent and child elements in the DOM structure.
51:08 📌 Using a Unique ID for Parent
- You opt to use the grandparent element with a unique ID to ensure reliability in case class names are reused.
52:21 📌 Constructing Custom XPath
- You create a custom XPath starting from the grandparent element to specify where you want to capture the child elements.
53:19 📌 Selecting Indirectly Associated Elements
- You acknowledge that the child elements are indirectly associated with the grandparent element due to intermediary elements in the DOM.
53:49 📌 Using Double Forward Slash
- To select the indirectly associated elements, you use a double forward slash in your XPath expression.
00:22 🛠️ In the last session, we learned about finding elements and creating utility methods for links, images, and more.
- Creating utility methods for different elements.
- Storing and returning lists of strings for validation.
01:05 🛠️ Today, we’re diving into select-based dropdown handling.
- Understanding the select tag in dropdowns.
- Using the select class to handle dropdowns.
02:14 🛠️ Differentiating between select-based and non-select-based dropdowns.
- Inspecting and recognizing select tags in dropdowns.
04:12 🛠️ Creating reusable methods for handling dropdowns.
- Utilizing the Select class for dropdown interactions.
07:39 🛠️ Selecting dropdown options by index.
- The importance of using index for constant values in dropdowns.
09:47 🛠️ Selecting dropdown options by value attribute.
- How to choose options based on the value attribute.
12:30 🛠️ Selecting dropdown options by visible text.
- A preferred method for selecting options when value attributes are not consistent.
13:59 🛠️ Considerations when choosing between index, value, and visible text for dropdown handling.
- The importance of select by visible text for flexibility.
16:03 🛠️ Creating reusable methods for handling dropdowns.
- Streamlining dropdown handling with custom utility methods.
19:47 🛠️ Demonstrating the convenience of using utility methods for dropdown handling.
- Simplifying the process of selecting values from dropdowns.
24:29 🛠️ The importance of checking the HTML tag of a dropdown.
- Select-based dropdown handling is specific to the select tag.
25:14 📚 Creating utility methods for handling select-based dropdowns in Selenium,
- You can create reusable utility methods for handling select-based dropdowns in Selenium.
26:27 📦 Working with the Select class in Selenium,
- The Select class in Selenium allows you to work with dropdowns and provides methods for selection and deselection.
27:15 🕵️ Using the getOptions method to retrieve dropdown options,
- You can use the getOptions method to retrieve all the options within a select-based dropdown.
29:38 🔄 Creating a reusable utility for counting dropdown options,
- You can create a utility method to count the number of options in a dropdown, making it easier to verify the expected count.
44:19 🧐 Validating the count of dropdown options and checking for specific values,
- You can use utility methods to validate the count of dropdown options and check for specific values within the dropdown.
52:37 🛠️ Handling select-based dropdowns in Selenium
- Creating utility methods for select-based dropdowns.
- Using a for loop to iterate through options and select a value based on text.
56:43 🤔 Selecting a dropdown value without the select class
- Demonstrating how to select a value from a dropdown without using the select class.
- Using XPath to capture the options and iterate through them to select the desired value.
59:00 📚 Homework assignment on finding applications with select-based dropdowns
- Homework assignment to identify applications with select-based dropdowns for practice.
- Creating a utility function to validate multiple values in a dropdown.
01:06:28 🔄 Sorting dropdown options alphabetically
- Sorting dropdown options alphabetically using the
- Demonstrating how to arrange the dropdown options in alphabetical order.
01:13:08 🛡️ Handling automatic population of values in dropdowns
- Discussing how some applications automatically populate values in dropdowns based on selections.
- Explaining the process of handling auto-populated data and validation.
- These sections provide insights into handling select-based dropdowns in Selenium, including creating utility methods, selecting dropdown values without the select class, and sorting options alphabetically. The homework assignment encourages practice, and the last section addresses handling auto-populated dropdown values.
01:18:52 🔍 Question about past class content,
- Discussion about what was covered in the last class.
01:19:22 🔢 Data types in Selenium,
- Explanation about using strings and integers in Selenium and how
01:20:09 🔀 Lists of integers for text values,
- Discussion on using lists and array lists for storing text values in Selenium.
01:21:40 🧩 Casting and object creation,
- Explanation about creating objects with top casting and interface in Java.
01:23:50 ⚠️ Handling exceptions with
- Discussion on handling checked exceptions when using
01:24:18 🕵️ Opening links in a new tab,
- Explanation on how to open links in a new tab using Ctrl+Click (or Command+Click for Mac).
01:25:01 📖 Retrieving dropdown values,
- Discussion on retrieving all dropdown values using Selenium in a registration page.
01:28:04 🤔 Handling multiple text input types,
- Explanation about handling different text input types (like email, text) in a registration page.
01:30:02 🚧 Troubleshooting paragraph count,
- Discussion about troubleshooting an issue with counting paragraphs.
01:31:10 📚 Homework about counting paragraphs,
- Discussion about a homework assignment regarding counting paragraphs on a webpage.
01:40:09 🦊 Troubleshooting Firefox driver setup,
- Discussion on troubleshooting issues with setting up the Firefox driver for Selenium.
01:45:13 🛠️ Solution for finding links without text,
- Explanation of a solution to find links without text and count them on a webpage.
01:47:44 🛠️ Locating elements by class name for specific tags like footer.
- To locate elements by class name for specific tags, identify the parent tag and then use double slashes to target the desired elements.
01:49:04 🛠️ Handling links within a specific tag (e.g., footer).
- Use double slashes followed by “a” to target links within a specific tag like a footer.
01:49:24 🛠️ Understanding element types like labels and handling them.
- Elements like labels may appear to be links but require different handling, such as using their text content instead of link-specific methods.
01:52:58 🛠️ Using class names for element identification.
- When locating elements by class name, ensure the class name is unique within the context of the parent element. In case of non-unique class names, consider using additional attributes or XPath to pinpoint the element.
00:00 📚 Explaining the usage of element utilities for drop-downs
- Discussing the use of element utilities like drop down by value and visible text.
- Demonstrating how to fetch and compare values for selecting options from a drop-down.
01:08 🌐 Capturing language links on Google’s website
- Explaining the scenario where language links need to be captured from a specific section of a webpage.
- Demonstrating the creation of an XPath for fetching language links from a div element.
03:26 🧩 Creating a generic method to click on a specific language link
- Discussing the creation of a method for clicking on a particular language link.
- Assigning a condition to click on the desired language link and break the loop.
06:16 🛠️ Homework assignment: Create a generic method for clicking language links
- Encouraging viewers to create a generic method that takes a locator and a language as input and clicks the language link.
- Assigning a task to the audience to implement this method.
07:46 📝 Homework assignment: Create a method to capture footer links
- Encouraging viewers to create a method that captures the footer links on the same webpage.
- Providing a task to implement a method that returns a list of footer links.
09:09 🌐 Capturing footer links on Google’s website
- Explaining the scenario of capturing footer links, including “advertising,” “business,” “privacy,” and “terms and settings.”
- Assigning a task to create a method that captures these links.
25:23 🕵️ Understanding XPaths in Selenium
- XPaths can be used to locate elements in a web page.
- Choosing a robust XPath is essential to ensure stability and accuracy.
27:13 🚀 Generic Method for Google Search
- Creating a generic method for Google search allows flexibility and reusability.
- The method can be customized for different searches and applications.
30:02 💡 Using Dynamic XPath
- Dynamic XPath is a concept that allows flexibility in locating elements with changing attributes.
- It can be used to handle dynamic class values.
38:16 ⚙️ Running Selenium Tests in Headless Mode
- Headless mode allows running tests without a visible browser window.
- It can be faster and less intrusive for parallel test execution.
49:14 🕶️ Incognito Mode in Selenium
- Incognito mode simulates private browsing without maintaining browsing history.
- It can be useful for testing scenarios where a clean browsing session is needed.
52:36 🔍 Explaining headless and incognito mode in Selenium,
- Selenium offers headless and incognito modes for browser automation.
- These modes are primarily used to save time in test execution.
54:06 🌐 Navigating web pages and simulating back and forward actions in Selenium,
driver.getmethod is used to launch a URL.
- You can simulate back and forward actions in Selenium using
driver.navigate().tomethods can be used for navigation, and they essentially do the same thing.
01:14:31 🔄 Refreshing a web page in Selenium,
- You can refresh a web page in Selenium using the
- Refreshing a page can be useful in certain scenarios, such as dealing with stale elements.
01:20:33 ❓ Clarification on
- The difference between
driver.getis used for navigating to a specific URL, while
driver.navigate().refreshis used to refresh the current page.
- You cannot use
driver.getfor back, forward, or refresh actions; you must use
driver.navigatemethods for those purposes.
01:21:40 🕵️♂️ Understanding Selenium Headless and Incognito Modes
- Selenium does not have a direct way to use incognito mode. You need to use Chrome options to enable it.
- Combining headless mode and incognito mode is often unnecessary and not a common use case in real-world automation.
01:23:25 📚 Navigating Back and Forward in Selenium
navigatemethod in Selenium provides navigation references and includes methods like
- You can chain methods together, such as
driver.navigate().back(), to perform navigation actions more efficiently.
01:25:07 🚀 HTTP Post Method in Selenium
- Selenium methods like
navigate().to()internally use HTTP POST methods for navigation.
- Understanding the underlying HTTP methods can help you troubleshoot and optimize your Selenium scripts.
01:27:11 💡 Session ID in Selenium
- In Selenium, the session ID represents the current browser session.
- The session ID can change when using actions like
close, and it’s crucial to understand how session management works in Selenium.
01:39:22 🕵️♂️ Finding Total Number of Text Fields with XPath
- You can find the total number of text fields on a registration page using XPath with attributes like
- XPath is a versatile tool for locating elements, even when no unique IDs or classes are available.
01:48:25 🕵️♂️ Locating Elements Without IDs or Classes
- You can locate elements using XPath even when there are no unique IDs or classes available.
- Attributes like
placeholderor other unique properties of the elements can be used in your XPath to find and interact with them effectively.
01:48:42 🛠️ Troubleshooting Selenium Error
- Troubleshooting a Selenium error in the code,
- Discussion about resolving a missing font size issue.
01:49:50 🛠️ Finding Desktop Application XPath
- Explanation of finding XPath for desktop applications,
- Mention of using specific utilities for inspecting desktop app elements.
01:50:25 🛠️ Importance of XPath for Desktop Apps
- Discussing the importance of XPath for desktop applications,
- Mention of the WinAppDriver and Winium for working with desktop apps.
01:51:40 🛠️ UI Spy and XPath
- A question about UI Spy and XPath, which is not answered.
01:52:06 🛠️ Troubleshooting Element Selection
- Troubleshooting an issue with element selection,
- Suggesting using
selectByVisibleTextto select an option,
- Commenting out unnecessary code.
01:55:09 🛠️ Waiting for Element Visibility
- Adding a sleep to wait for element visibility,
- Discussing the need to handle cookies manually.
01:56:48 🛠️ Troubleshooting No Such Element Exception
- Facing a “No Such Element” exception,
- Advising on improving the XPath or element selection.
00:00 🤖 Understanding the Importance of XPath
- XPath is crucial for dealing with UI elements in Selenium.
- Absolute XPath is not recommended due to its fragility in the face of changes in the HTML structure.
- Relative XPath allows for more robust and flexible element identification.
07:40 🛡️ Using Attributes and Combining Conditions
- XPath can be crafted using tag names and attributes like ID, name, or placeholder.
- Multiple attributes can be combined using ‘and’ and ‘or’ conditions.
- XPath can be used to target elements with specific attributes effectively.
20:55 💼 Utilizing the Text Function in XPath
- The ‘text’ function is used in XPath to target elements based on their textual content.
- It’s essential for selecting elements like links with specific text.
- XPath with the ‘text’ function can make your test scripts more robust.
24:17 📋 Locating Elements Using XPath and Verifying Their Count
- Demonstrating how to locate elements with XPath.
- Using XPath to find elements and verify their count on a web page.
26:42 🐞 Identifying Missing Elements and Verifying Text
- Discussing how to identify missing elements (e.g., “Forgotten password”) and verify their presence.
- Using XPath to check if specific text is present on a web page.
27:49 🧐 Handling Complex Web Pages
- Demonstrating XPath usage on a more complex web page (freshworks.com).
- Emphasizing the need for robust XPath expressions, especially when dealing with dynamic attributes or changing IDs.
34:29 🌐 Finding All Links with Specific Attributes
- Exploring how to find all links with specific attributes, like ‘href’ values, using XPath.
36:16 🧩 Combining Multiple Attributes in XPath
- Discussing the flexibility of combining multiple attributes in XPath expressions.
- Showing examples of combining ‘contains’ and ‘equals’ for dynamic attributes.
39:41 🔄 Handling Dynamic Attributes
- Addressing how to handle dynamic attributes, such as dynamically changing IDs, in XPath expressions.
- Demonstrating the use of ‘contains’ with dynamic attributes to create robust XPath expressions.
43:27 🧑💻 Dealing with Complex Text Using XPath
- Exploring how to use XPath with ‘contains’ to handle complex or dynamic text in elements, making the XPath more flexible.
- These sections cover various aspects of XPath usage in Selenium for web automation, from basic element location to handling complex scenarios and dynamic attributes.
51:02 🧐 XPath basics and examples
- XPath is a powerful tool for locating elements in web pages.
- You can use XPath to find elements based on various criteria, such as tag name, text, attributes, and more.
52:13 🎯 Finding links with specific text using XPath
- You can use XPath to locate specific links on a web page based on their text content.
- This allows you to filter and extract links with certain keywords efficiently.
53:26 🕵️ Combining text and attribute criteria in XPath
- XPath can be used to locate elements based on both text content and attributes.
- This provides flexibility in targeting elements that meet specific criteria.
54:47 🤯 XPath advanced techniques
- Advanced XPath techniques like starts with and ends with are not supported in modern browsers.
- Focusing on the fundamentals and practicing is essential for XPath mastery.
58:11 🤝 Handling dynamic and frequently changing locators
- Dealing with frequently changing locators in UI automation requires manual locator updates.
- It’s important to ensure the application’s stability before extensive automation work.
- These sections provide insights into XPath, its usage in locating elements, and dealing with dynamic locators in UI automation. Mastery of XPath requires practice and a thorough understanding of its syntax and capabilities.
01:18:07 🕵️♂️ Understand when to start automation
- Application stability is crucial for automation.
- Start automation when the application is stable and changes are minimal.
01:21:26 🤖 Handling dynamic web pages
- Dynamic web pages require using dynamic XPath.
- Handling dynamic data is essential for automation.
01:27:22 🎯 Customizing XPath with “contains”
- Using “contains” in XPath to find elements with partial text.
- “contains” can be used to locate elements based on partial text matches.
01:37:05 🤔 Handling changing class attributes in automation
- Google frequently changes class attributes to deter automation.
- Relying solely on class attributes for automation can be challenging.
01:43:34 🕵️ Handling attribute-based XPath
- Discussion about using XPath to locate elements by attributes.
- Clarification on using attribute names without values in XPath.
01:44:28 🧭 Navigating web elements
- Demonstrating how to navigate and interact with web elements using Selenium.
- Explaining the use of XPath to access specific elements.
01:46:35 🌐 Selecting and combining elements
- Discussing techniques for selecting and combining elements using XPath.
- Demonstrating how to capture footer links with varying depths in the DOM.
01:54:16 🌍 Dealing with non-unique IDs
- Addressing the issue of non-unique element IDs in web applications.
- Suggesting a solution using indexing to access elements with duplicate IDs.
01:56:23 🚫 Handling StaleElementReferenceException
- Explaining the StaleElementReferenceException and its resolution.
- Emphasizing the need to use ‘break’ in certain situations to avoid this exception.
02:00:02 📝 Upcoming session notes
- Request for session notes to be uploaded.
- Assurance to provide the notes in a weekend.
02:01:57 🪐 Handling pop-up sign-in box
- Inquiry about managing a pop-up sign-in box on Google while using Selenium.
- Discussion about switching to iframes and handling pop-ups.
00:41 📚 Understanding the importance of correct XPath syntax in Selenium,
- XPath confidence and correctness,
- Exploring XPath combinations and concepts like siblings and indexing.
01:38 🎯 Exploring position and index in XPath,
- Discussing the capture group concept for handling multiple elements,
- Demonstrating how to navigate to specific elements using indexes and positions in XPath.
05:37 💼 Practical use case of indexing in XPath,
- Navigating to specific elements within a web page,
- Checking the position of elements in a footer section.
17:21 📝 Using classes with XPath and className,
- Understanding how to use multiple classes in XPath,
- Clarifying the usage of class attribute values in XPath and className in Selenium.
23:47 🧩 Differentiating between valid and invalid XPath and className combinations,
- Clearing up common misconceptions about using multiple classes in XPath,
- Establishing guidelines for using single or multiple classes in XPath and className.
25:28 🧐 Understanding Sibling Relationships
- Siblings in the DOM hierarchy refer to elements at the same level.
28:06 🧩 Using XPath for Parent-Child Navigation
- XPath can be used to traverse from a parent element to a child element.
29:51 📜 Understanding Single Slash vs. Double Slash in XPath
- Single slash in XPath retrieves only the directly associated elements.
- Double slash in XPath retrieves both direct and indirect child elements.
31:08 🧐 Selecting Elements Based on Sibling Relationships
- You can navigate from one sibling element to another using XPath.
- Use the
following-siblingaxes in XPath to select the desired elements.
44:27 🚀 Solving a Complex Web Table Selection Challenge
- Solving a challenge of selecting a checkbox in a dynamic web table.
- Using XPath to traverse from a reference element (e.g., username) to the target checkbox.
52:25 📌 Traversing Parent, Sibling, and Child Elements
- The step-by-step XPath traversal: child, immediate parent, preceding sibling, child.
- Demonstrating how to reach the target element using XPath in a complex scenario.
52:57 📊 Explaining how to navigate to a specific element using XPath.
- Demonstrates how to use XPath to locate an element based on its relationship with other elements.
- Shows the use of the “preceding-sibling” axis in XPath to move to an element’s sibling.
01:07:24 📝 Discussing the creation of dynamic XPath for different elements.
- Explains the concept of creating dynamic XPaths based on changing element attributes.
- Demonstrates how to use text values to make XPaths more flexible and adaptable.
01:14:25 🧰 Optimizing XPath for efficient element locating.
- Introduces the concept of using “ancestor” and “ancestor-or-self” axes in XPath to simplify element location.
- Highlights the importance of optimizing XPath locators for better automation efficiency.
01:21:53 🛠️ Handling Custom XPath and Sibling Elements
- Learning about custom XPath for dynamic web elements.
- Exploring techniques for interacting with sibling elements.
- Understanding how to use XPath without indexing for robust automation.
01:24:10 🖱️ Selecting Checkboxes in a Table
- Demonstrating how to select checkboxes in a web table using XPath.
- Using sibling XPath to locate checkboxes based on adjacent elements.
- Providing a solution for clicking on a specific checkbox without relying on index.
01:28:10 🗺️ Handling Dynamic Dropdowns Based on Country
- Discussing the approach for handling dynamic dropdowns based on the selected country.
- Suggesting a generic method to retrieve states dynamically without nested loops.
- Addressing scenarios where some countries may not have associated states.
00:01 🧭 XPath Concepts
- Introduction to XPath and concepts like siblings.
- Explains the need for dynamic XPath.
01:10 🕵️ Web Table Handling Use Case
- Discusses a use case of handling a web table in a CRM application.
- Describes the goal of creating a utility for selecting users in the web table.
03:13 🌐 Dealing with Frames
- Introduces the concept of frames and explains its importance when interacting with elements inside frames.
- Clarifies that the frame concept will be covered in a dedicated chapter.
07:43 🧩 Selecting Elements by Link Text
- Demonstrates selecting elements by link text, emphasizing the importance of using the text visible on the web page, not in the DOM.
- Shows how to click on the “Contacts” link using link text.
12:51 🧾 Dynamic XPath Generation
- Explains the creation of dynamic XPath for selecting checkboxes based on user names.
- Highlights the dynamic nature of the XPath and the importance of maintaining single quotes for text.
16:50 🧰 Creating a User Selection Utility
- Demonstrates the creation of a utility method for selecting users by passing their names.
- Shows how this utility method can work for different users.
20:16 📝 Fetching Additional Information
- Explains the process of fetching additional information from web elements, in this case, the company name.
- Demonstrates the creation of a utility method to retrieve the company name for a given user.
24:27 🔄 Applying Utility Methods
- Shows the application of the utility methods for selecting users and retrieving their company names.
- Displays how the methods work for multiple users in the web table.
24:40 🔍 Understanding the structure of a static web table
- The static web table has a basic structure with headers and data rows.
- Headers are represented by
th(table header) tags, while data is in
td(table data) tags.
- The table structure consists of
51:05 📊 Retrieving the header count of the static web table
- We use XPath to locate the
tableelement by its ID and directly count the
th(table header) elements within it.
- The method
getTableHeaderCountprovides the total count of headers in the static web table.
53:21 💡 Capturing header count and rows in a web table
- Obtaining the header count and calculating the total number of rows in a web table.
54:52 💡 Getting row count and column count for a web table
- Demonstrating how to calculate the total number of rows and the constant column count in a web table.
57:16 💡 Iterating and fetching values from a web table
- Explaining how to iterate through and retrieve values from the first column of a web table using dynamic XPaths.
59:40 💡 Selecting values from a drop-down using sibling XPath
- Demonstrating how to select a value from a drop-down by identifying the associated label and using sibling XPaths to reach the select element.
01:20:04 💡 Getting an attribute value from a web element
get attributemethod to retrieve an attribute value from a web element.
- The value returned is based on the attribute, not the visible text.
01:20:50 💼 Structuring packages and sub-packages in a Java project
- When organizing packages in a Java project, consider creating a top-level package based on your company or project name.
- Within this top-level package, you can create sub-packages for individual projects, helping maintain a structured hierarchy.
- Further, sub-packages can be nested for organizing different components or modules.
01:26:34 🔄 Dealing with a list of elements and using web element attributes
- When working with a list of elements and using
get attribute, be aware that this method applies to the entire list, not individual elements.
- To access attributes of specific elements within the list, you should use a loop or iterate through the options using
00:00 📚 Introduction to CSS Selectors in Selenium
- Introduction to CSS selectors and their role in Selenium testing.
01:00 🚀 Using CSS Selectors for ID
- CSS selector for ID using the hash symbol.
- Combining tag name with ID to create a CSS selector.
05:03 🔍 CSS Selectors with Class Names
- Creating CSS selectors using class names.
- Handling single and multiple class names in CSS selectors.
08:22 🧐 Finding Elements with Multiple Classes
- Creating CSS selectors with multiple class names for specific elements.
- Exploring the use of unique class names for better selection.
22:05 👨💻 Practical Examples of CSS Selectors
- Practical application of CSS selectors for button elements with class names.
- Demonstrating the use of unique class names in CSS selectors.
25:52 📝 Understanding CSS Selectors
- CSS selectors allow you to target and style elements on a web page.
- You can combine multiple classes and IDs together in CSS selectors.
- The order of classes and IDs in a selector can be flexible, allowing you to write them in any sequence using dots for classes and hashes for IDs.
27:06 🧩 Combining IDs and Classes
- You can combine IDs and classes in CSS selectors by specifying the tag name, hash (for ID), and dots (for classes) in the desired order.
- You can change the sequence of IDs and classes in the selector to match your requirements.
- It’s essential to understand the proper sequence and syntax to create effective selectors.
33:21 📌 Selecting Elements by Other Attributes
- You can select elements by attributes other than IDs and classes in CSS selectors.
- The formula for selecting by attribute is the tag name followed by square brackets, inside which you specify the attribute and its value.
- This method allows you to target elements based on various attributes like name, type, or any other HTML attribute.
38:18 🔄 Combining Multiple Attributes
- CSS selectors can be used to combine multiple attributes by adding separate square brackets for each attribute-value pair.
- The “and” condition is implied between attributes, ensuring all specified attributes match the selected elements.
- This method provides flexibility for selecting elements based on multiple attributes.
50:08 🚫 Limitation: CSS Selectors and Text Matching
- CSS selectors cannot be used to target elements based on their text content.
- Unlike XPath, CSS selectors lack a “contains” function for matching elements with specific text.
- This limitation can make it challenging to select elements solely based on their text content using CSS selectors.
53:52 📋 Understanding CSS Selectors in Selenium
- CSS selector special characters: *, ^, and $
01:00:05 🧐 Child to Parent Relationship in CSS
- Explaining the child to parent relationship in CSS.
- Discussing the limitations of CSS for traversing backward.
01:13:13 🚧 Limitations and Advantages of CSS Selectors
- Exploring the limitations of CSS selectors, such as the inability to traverse backward.
- Mentioning that modern browsers have their XPath engines, making XPath performance comparable to CSS.
01:16:17 🧰 Handling Multiple Dropdowns with Generic Methods
- Suggesting the use of a generic method to handle multiple dropdowns on the same page.
- Explaining how to pass the label name and create a select class locator for each dropdown.
01:19:31 📚 Interview Preparation for Selenium Job
- Preparing for a Selenium job interview with requirements for Selenium, Java, and Python.
- Advising an experienced candidate to focus on Selenium, Java, and Python knowledge.
01:20:22 💡 Extracting Properties from Web Elements
- You can extract properties like background color and font size of web elements using Selenium.
- Use the
getCSSValuemethod to capture specific styles or attributes of elements.
01:21:58 💼 Troubleshooting Missing Characters in Eclipse
- Eclipse might display characters as question marks if it doesn’t support the language patch.
- Ensure that your Eclipse and system settings support the language you’re using.
01:23:17 🛠️ Troubleshooting WebDriver Issue
- If you encounter errors like “failed to create session” with WebDriver, consider upgrading your Chrome browser.
- Make sure you’re using the latest version of Chrome and ChromeDriver.
01:30:19 🧐 Capturing Text from Web Elements
- When capturing text from web elements, you can target the visible text on the web page, not the HTML source.
- Pay attention to the structure of the page and consider whether you need to exclude non-text elements.
01:35:52 🤖 Handling Dynamic Web Page Changes
- When dealing with dynamic web pages, avoid using hard-coded index values, as changes in the page’s structure may break your tests.
- Use unique attributes or element identification techniques that can adapt to changes in the page structure.
00:14 🧐 Understanding CSS Selectors
- CSS selectors should be practiced to be comfortable with.
- Different varieties of CSS selectors include ID, class, and more.
01:09 📜 Comma Separated CSS Selectors
- You can use a comma to combine multiple CSS selectors into one.
- For example, “input#username, button#loginBTN” selects both input and button elements.
03:00 🧹 Filtering with “:not” in CSS
- You can exclude specific elements from a selection using “:not”.
- For example, “input.C1.C2:not([name=’first name’])” excludes elements with name ‘first name’.
19:29 🎯 Using Indexing in CSS Selectors
- CSS allows you to use “first-child” and “last-child” selectors.
- These selectors help you target the first and last child elements within a parent.
25:53 📚 XPath vs. CSS in Selenium
- XPath is more complex with syntax, while CSS is simpler with ID and class selectors.
- XPath provides more functions and flexibility for complex scenarios.
- CSS is generally faster in modern browsers, but both are comparable in terms of performance.
31:02 🖥️ Web Table Handling
- XPath allows for more versatile handling of web tables, making it easier to navigate left, right, and other directions.
- CSS offers limited options for web table handling and can be less versatile in such scenarios.
50:44 🧑🤝🧑 Sibling Support
- Both XPath and CSS support sibling selection, but CSS primarily allows for selecting following siblings using the “+” symbol.
- XPath offers more comprehensive sibling selection capabilities.
- These sections summarize the main points related to XPath and CSS differences, web table handling, and sibling support in the context of Selenium automation.
51:39 🔍 CSS Selectors and Sibling Concept
- Differentiating between sibling concepts in CSS Selectors,
- Use of “+” and ” ” (space) to select immediate and all following siblings.
55:12 🛠️ Preparing for XPath and CSS
- Preparing for XPath and CSS locators for web automation,
- Practice and mastery are essential for using these locators effectively.
56:30 ⚙️ Using CSS and XPath in Different Scenarios
- Discussing the frequency of using CSS and XPath locators,
- Identifying scenarios where selectors like “:first-child” or “:last-child” are useful in CSS.
58:49 🤖 Interaction with Select Class
- Explaining the usage of the Select class in Selenium for handling dropdowns,
- Creating web elements using XPath or CSS selectors to interact with dropdown options.
- You can use the
alertmethod to create alerts and handle them with Selenium.
- You switch to an alert using
driver.switch_to.alertand can capture text and accept or dismiss the alert.
- Confirmation pop-ups have OK and Cancel buttons.
alert.accept()to click OK and
alert.dismiss()to click Cancel.
- You can capture text from the confirmation pop-up using
- Prompt pop-ups have text input fields.
alert.sendKeys("your text")to enter text.
- You can then accept or dismiss the prompt pop-up with
- Pop-ups typically contain one or more text fields for user input.
28:00 📤 Handling Authentication Pop-up
- Authentication pop-ups may have a username and password field.
- You can embed credentials in the URL to bypass these pop-ups.
31:37 📎 Handling File Upload Pop-up
- Handling file upload pop-ups involves using the
sendKeysmethod with the file path.
- It’s essential to ensure the HTML attribute
type="file"is present in the file input element for
46:26 🖼️ Understanding Frames in Web Pages
- Frames are separate sections within a web page.
- Selenium may need special handling to interact with elements inside frames.
50:51 ⚙️ Understanding Frames in Selenium
- Frames are used to isolate web elements for security and organization.
- There are two types of frames, “frame” and “iframe,” but they serve a similar purpose in automation.
52:51 🔀 Switching Between Frames
- To interact with elements inside frames, you need to switch to the frame.
- Selenium provides three methods for switching to frames: by index, by name or ID, and by the frame element.
54:36 🔄 Handling Frames by Index
- Switching to frames by index is not recommended because it requires manual counting and can be error-prone.
55:05 🔄 Preferred Method: Switching Frames by Name or ID
- Switching to frames by name or ID is the recommended approach, as it is more stable and less error-prone.
56:25 🔗 Switching Frames with the Frame Web Element
- You can switch to a frame by using a web element representing the frame. This method is useful when name or ID attributes are not available.
59:37 🕵️ Detecting Frames
- You can check if a page contains frames by right-clicking near an element and looking for the “View Frame Source” option in the context menu.
- You can also detect frames using XPath to count the frame elements on a page.
01:12:25 🌐 Handling Frames Within Iframes
- Frames and iframes are handled in a similar way in Selenium, and both require switching to the frame to interact with elements inside.
- Clicking an element within an iframe can load the iframe on the page.
01:15:11 🔄 Handling Frames Within Iframes with Dynamic IDs
- If the iframe has a dynamic ID, you can use XPath with a partial match or contains to locate and switch to the iframe.
- The process of switching to frames within iframes is the same as with regular frames.
01:17:20 🔍 Understanding frame handling in Selenium
- When dealing with frames in Selenium, it’s essential to switch to the frame where the desired element is located.
- To switch to a frame, you can use the
- After interacting with elements within the frame, make sure to switch back to the default content using
01:18:02 🖥️ Handling nested frames in Selenium
- If you have multiple nested frames on a web page, you can switch between them using
driver.switchTo().frame()with the frame name or index.
- You can traverse nested frames by switching between them in the order of their hierarchy.
- To verify if you’ve successfully come out of a frame, try interacting with an element outside the frame, such as a button or link.
01:23:56 🚫 Best practice for handling alerts in Selenium
- When handling alerts in Selenium, it’s advisable to store the alert in a reference and perform actions like accepting or dismissing it using that reference.
- Avoid chaining alert actions directly to the
driver.switchTo().alert()method, as it can lead to unexpected behavior.
- Storing the alert in a reference provides more control and clarity in your code.
01:26:01 📜 Extracting text from parent and child elements
- When extracting text from elements in Selenium, you can get text from parent elements that contain child elements.
- Selenium will return the text of both the parent and child elements if you apply
getText()to the parent element.
- You don’t need to create separate code to extract text from child elements; the parent element’s
getText()method will include it.
01:27:48 🧩 Handling multiple frames in complex hierarchies
- When dealing with complex page structures with multiple frames and Shadow DOM elements, you need to navigate through the hierarchy.
- Switch to each frame or Shadow DOM as needed in the order of their hierarchy to interact with specific elements.
- The hierarchy in DevTools may differ from Java indexing, so ensure you use the right frame or Shadow DOM path.
01:29:38 📋 No default frame concept in Selenium
- In Selenium, there is no concept of a default frame. You must explicitly switch to the frame you want to interact with.
- When landing on a page, you need to decide which frame to switch to based on the structure of the web page.
- Manual observation and understanding of the page’s structure are essential to determine the correct frame to interact with.
00:00 🚀 Introduction to handling browser window pop-ups in Selenium
- Explaining the need to handle browser window pop-ups and their characteristics.
02:52 🌐 Understanding the target attribute for links
- Discussing the “target” attribute and how it affects whether a link opens in a new tab or the same tab.
05:30 🪟 Capturing and switching to a new browser window
- Capturing the window handles for both the parent and child windows and switching between them.
16:45 🚧 Closing child windows and returning to the main window
- Demonstrating the process of closing a child window and ensuring you return to the main window to continue your automation tasks.
25:07 🔍 Handling pop-up windows in Selenium
- Explanation of handling pop-up windows and switching between them.
- Demonstrates capturing URLs and closing child windows.
29:34 🔄 Handling multiple windows in Selenium
- Explains how to handle multiple windows in Selenium.
- Demonstrates using window handles and switching between multiple windows.
44:23 🪄 Handling multiple windows without closing the parent window
- Discusses a scenario of managing multiple windows without closing the parent window.
- Demonstrates using the parent window’s window handle for control.
51:52 🖥️ Explaining browser window handling
- Discusses the process of handling multiple browser windows in Selenium.
- Mentions switching back to the parent window and the need for handling child windows.
55:15 🌟 Introducing the new window handling method in Selenium 4
- Introduces the driver.switchTo().newWindow() method in Selenium 4.
- Demonstrates how to open a new tab or a new window using this method.
58:11 🪟 Difference between driver.quit() and driver.close() for closing windows
- Explains the difference between driver.quit() and driver.close() in Selenium for closing browser windows.
- Highlights the impact of using driver.quit() on the entire driver instance.
01:03:12 🚫 Handling random pop-ups
- Discusses the challenges of handling random pop-ups in web applications.
- Recommends disabling such pop-ups in non-production environments.
01:10:50 🪟 Handling multiple windows and alerts
- Clarifies that handling multiple browser windows and alerts simultaneously is not possible.
- Advises against attempting to automate such scenarios.
01:14:03 🌐 Advertising pop-ups and iframes
- Explains that some advertisements are displayed within iframes in web applications.
- Suggests that handling such advertisements is part of web element interactions, not separate pop-ups.
00:02 🤖 Introduction to Relative Locators in Selenium 4
- Relative locators introduced in Selenium 4.
01:06 🧭 Understanding Relative Locators
- Relative locators allow finding elements based on their relation to a base element, like left, right, above, below, or near.
02:30 🧩 Applying Relative Locators to Web Table
- Demonstrating how to use relative locators to interact with a web table in Selenium.
08:04 🌐 Finding Element to the Right
- Using a relative locator to find an element to the right of the base element and capturing its text.
12:17 🌐 Finding Element to the Left
- Using a relative locator to find an element to the left of the base element and capturing its text.
14:55 🌐 Finding Element Above
- Using a relative locator to find an element above the base element and capturing its text.
16:36 🌐 Finding Element Below
- Using a relative locator to find an element below the base element and capturing its text.
17:34 🌐 Finding Nearby Element
- Using a relative locator to find a nearby element to the base element and capturing its text.
20:37 🌐 Customizing the Range for “Near” Elements
- Explaining that the “near” element locator has a defined range of 100 pixels to find the nearest element.
22:31 🧪 Practical Use of Relative Locators
- Suggesting how to use relative locators for common scenarios, such as finding a label above a text field.
25:04 🌍 Understanding SVG Elements
- SVG elements are used for drawing vector graphics or diagrams.
- SVG elements are often used for creating logos, icons, and other graphical elements on web pages.
27:07 🖥️ Inspecting an SVG Element in Selenium
- To automate interactions with SVG elements, you need to inspect and identify them.
- Normal XPaths won’t work with SVG elements; you must create a special XPath for SVG.
30:19 🧐 Identifying SVG Elements Using Special XPath
- Creating a specific XPath for SVG elements involves using
- This specialized XPath helps you identify and interact with SVG elements accurately.
42:07 🌐 Switching Frames and Capturing SVG Elements
- When SVG elements are within an iframe, you need to switch to the frame to access them.
- Once inside the iframe, you can capture SVG elements using the special XPath.
46:43 🔄 Iterating Through and Interacting with SVG Elements
- You can iterate through a list of SVG elements and interact with them using Selenium.
- In this case, the speaker demonstrates how to capture the name attribute of SVG elements.
48:27 🖱️ Clicking on Specific SVG Elements
- You can programmatically click on SVG elements based on specific conditions, such as the name attribute.
- This allows you to interact with and trigger actions on SVG graphics within a web page.
50:15 🧩 Understanding SVG Elements in Selenium
- SVG elements in Selenium require specific handling.
- Always use local name for SVG elements to ensure accurate identification.
52:18 🕵️ Challenges in Selecting SVG Elements
- Selecting SVG elements can be challenging due to their non-standard structure.
- Normal XPath expressions won’t work for SVG elements; you need to use local name.
53:13 🧐 Crafting XPath for SVG Icons
- Creating XPath for SVG icons involves using local names and additional attributes.
- Crafting precise XPath expressions is essential for selecting SVG elements.
55:07 🛠️ Selector Hub and Ready-Made XPaths
- Selector Hub can provide ready-made XPaths for elements but may not offer insight into how they are constructed.
- Writing your own XPath expressions builds confidence and understanding.
56:27 🌐 Handling Multiple Frames
- When dealing with multiple frames, you may need to switch to the appropriate frame.
- In some cases, you might not need to switch frames if they are in the same context.
57:44 🚀 Dealing with Spaces and Normalize Space
normalize-space()in XPath helps handle text with varying spaces.
- It trims spaces and ensures accurate matching, simplifying your XPath expressions.
00:00 🕶️ Understanding Shadow DOM and Pseudo Elements
- Shadow DOM concept and its use.
03:45 🖋️ Capturing Pseudo Elements Content
19:21 🧩 Capturing Text from Input Fields
- Explaining how to capture text from input fields in Selenium after entering values.
- Highlighting the importance of extracting text from input fields for automation testing.
24:19 💡 Handling Text Fields: Get Text Method
getTextmethod won’t work for text fields; it only works for elements with text already in the DOM.
- To capture the text value from a text field, use
getAttribute("value")with the attribute “value.”
27:25 💡 Handling Placeholder Values
- You can capture placeholder values of text fields using
- No need to refresh the page; just enter a value and fetch the placeholder attribute.
28:09 💡 Handling Disabled Elements
- Sending null to a text field using
sendKeysresults in an
- Disabled elements, like buttons, will throw an
ElementClickInterceptedExceptionif you try to click them.
38:25 💡 Handling Invalid Locators
- Using an invalid locator (e.g., wrong XPath syntax) leads to an
- A valid locator with no matching element results in a
47:44 💡 Selenium Exception Hierarchy
- Selenium exceptions follow a hierarchy: WebDriverException > NotFoundException > NoSuchElementException.
- The parent of all Selenium exceptions is WebDriverException.
48:02 💡 Stale Element Reference Exception
- Stale Element Reference Exception occurs when an element becomes “stale” or no longer attached to the DOM.
- Commonly happens when you interact with an element, and the page is refreshed or changed.
- To handle this, re-locate the element or refresh the page if necessary.
- These sections provide insights into handling various situations and exceptions while working with Selenium in Java.
51:25 🕵️ Stale Element Reference Exception Explanation
- Stale Element Reference Exception is caused when a web element becomes stale or no longer valid due to changes in the DOM (Document Object Model).
55:04 🔄 How DOM Versions Impact Stale Element Reference Exception
- When a web page is refreshed, a new version of the DOM is created, and any web element created from the old DOM becomes stale.
57:28 🔄 Dealing with Stale Element Reference Exception
- To resolve Stale Element Reference Exception, you should re-create the web element after a page refresh to match the latest DOM version.
01:10:47 🔄 Handling Stale Element Reference Exception with List of Web Elements
- Stale Element Reference Exception can also occur when interacting with a list of web elements after a page change. Recreating the elements is necessary.
01:17:05 🧩 Understanding Stale Element Reference Exception
- Stale Element Reference Exception occurs when a web element on a page becomes “stale” after a page refresh.
- The issue arises when the web element reference is not updated to the latest DOM version.
01:18:06 🔄 Handling Stale Element Reference Exception
- To handle Stale Element Reference Exception, update your web element references after any page refresh or DOM change.
- This ensures your web element references stay valid and prevent the exception.
01:21:40 🕰️ Fluent Wait for Handling Stale Element Reference Exception
- Fluent Wait is a technique that can automatically handle Stale Element Reference Exception without manually refreshing element references.
- It’s a useful tool when dealing with dynamic web pages.
01:26:52 🔄 Handling Stale Element Reference Exception with Back and Forward
- You can handle Stale Element Reference Exception by going back to the previous page and coming forward before interacting with elements.
- This method works effectively to avoid the exception in some cases.
01:31:00 🔄 Handling Stale Element Reference Exception When Elements Are Added
- If the number of elements on a page changes after interacting with elements, refresh your web element references to match the updated DOM.
- This prevents Stale Element Reference Exception.
01:38:22 🆔 Web Element IDs and Stale Element Reference Exception
- Selenium maintains a unique ID for each web element when you use
- If the page is refreshed or the DOM changes, the previously obtained element references become stale, and you need to create new references.
01:39:17 🌐 Web Element IDs and Element Expiry
- Selenium generates a new web element ID for each element every time the DOM changes.
- This mechanism ensures that elements are not used in their expired state and are re-located as needed.
00:01 🔍 Introduction to Actions Class in Selenium
- Actions class is used for simulating user actions like mouse movements, clicks, and keyboard inputs in Selenium.
- It’s crucial for handling complex user interactions, such as drag and drop and mouse over on web elements.
01:33 🖱️ Simulating Mouse Hover with Actions Class
- Demonstrates how to use the Actions class to perform a mouse hover on a web element.
- Explains the importance of mouse hovering to make hidden elements visible for interaction.
03:19 🍔 Handling Parent Menu and Child Menu
- Shows how to handle parent menu and child menu elements, making them visible for interaction.
- Discusses the importance of performing a mouseover action to access child menu items.
11:13 🛠 Building and Performing Actions
- Explains the need to use
performmethods after defining actions with the Actions class.
- Demonstrates how to properly structure actions for execution.
13:54 🎯 Clicking on a Hidden Element
- Shows how to interact with hidden elements by first making them visible through mouseover actions.
- Emphasizes the importance of using Actions class for such scenarios.
15:42 🏙 Real-World Application of Actions Class
- Encourages applying the concepts of parent and child menus handling to real-world scenarios, like e-commerce websites.
- Challenges the viewer to try similar scenarios on their own.
16:56 🚫 Handling Hidden Elements Without Actions
- Demonstrates the limitations of interacting with hidden elements without using the Actions class.
- Highlights the necessity of making elements visible for proper interaction.
18:16 🧩 Understanding Hidden Elements
- Explains the concept of hidden elements in web applications and the need to reveal them for interaction.
- Provides examples of hidden elements in e-commerce applications.
19:34 🛒 Handling Hidden Elements Assignment
- Encourages the viewer to practice handling hidden elements in a real application like SpiceJet.
- Specifically, suggests practicing mouseover actions for menu and sub-menu interactions.
21:34 🌟 Introduction to Drag and Drop with Actions Class
- Introduces the concept of drag and drop interactions in web applications.
- Mentions that drag and drop is commonly used in web designing scenarios.
23:02 🪄 Drag and Drop Elements in Selenium
- Demonstrates how to perform drag and drop interactions between two web elements using the Actions class.
- Explains that this technique is suitable for scenarios like reordering elements on a web page.
24:47 🚗 Drag and Drop Limitations
- Emphasizes that drag and drop in Selenium can only be performed within the same browser window.
- Highlights that external file system interactions are not possible with Selenium’s drag and drop.
25:28 ⚙️ Step-by-Step Drag and Drop Actions
- Provides a step-by-step guide on how to use the Actions class for drag and drop interactions.
- Explains the sequence of actions required: click and hold, move to the target element, and release.
25:58 🖱️ Overview of Selenium’s Actions class
- Actions class is used to perform complex interactions with web elements.
- It allows you to chain multiple actions and execute them sequentially.
26:26 🏗️ Builder pattern in Selenium’s Actions class
- The Actions class in Selenium follows the Builder pattern.
- Each method in the Actions class returns an instance of the Actions class, allowing you to chain actions.
29:03 🧩 Right combination for using build and perform
- When performing multiple actions with the Actions class, it’s essential to use both
performto ensure actions are executed in the correct sequence.
- Omitting either
performmay result in incorrect behavior.
31:34 📝 Handling right-click actions with Selenium
- You can use the Actions class to perform right-click (context-click) on web elements.
- Context-click is useful for simulating right-click interactions in web applications.
37:02 📜 Capturing context menu items after right-click
- After right-clicking a web element, you can capture the context menu items.
- These items can be retrieved using appropriate XPath or CSS selector.
48:16 🖱️ Using Actions class for click and sendKeys
- The Actions class can be used to perform click and sendKeys operations on web elements.
- This is particularly useful for interacting with elements that require both clicking and text input.
53:09 🖱️ Actions Class and Its Use Cases
- Actions class provides methods for more advanced user interactions in Selenium.
- You can use actions like sending keys, clicking, and moving the mouse with Actions class.
- It’s particularly useful when dealing with elements that might be non-interactable or hidden.
56:16 ⚠️ Handling Element Interactions with Actions Class
- The Actions class is helpful when handling elements that are not interactable, causing exceptions like “element not interactable.”
- It’s commonly used when dealing with elements that might be hidden or blocked by other elements on the page.
- Actions class allows you to simulate user interactions like moving the mouse, sending keys, and clicking on elements effectively.
01:15:11 🖌️ Drawing with Selenium and Actions Class
- You can use the Actions class to simulate drawing on a canvas element, such as a signature pad.
- It’s useful for scenarios where you need to draw something on a canvas element before submitting a form.
- By providing X and Y offsets, you can control the movement of the mouse while drawing on the canvas.
01:15:57 🧊 Freezing the Page for Inspecting Elements
- Sometimes, when inspecting elements, menus or pop-ups may disappear when right-clicked or hovered over.
- To inspect such elements, you can freeze the page by pressing function F8 in the browser’s developer tools (Sources tab).
- Freezing the page allows you to inspect elements without them disappearing, making it useful for tricky inspection scenarios.
01:19:56 🚀 Troubleshooting Click Intercepted Exception
- Dealing with “Element is not interceptable” errors.
01:24:42 🛠️ Handling Random Pop-ups
- Discussing the challenges of handling random pop-up windows in Selenium.
- Explaining that random pop-ups can’t be predicted and resolved with certainty.
01:31:23 🕶️ Troubleshooting Specific Element Interception
- Investigating the issue of a specific state (Florida) not working in the script.
- Suggesting a workaround to check if viewport size or page loading might be the issue.
01:42:00 🗺️ Handling Click Intercepted Exception for Specific State
- Analyzing the problem of a specific state (Florida) causing a click interception exception.
- Suggesting alternative approaches to interact with the element.
01:45:12 🏞️ Resolving Issue with County Names Retrieval
- Addressing an issue where county names retrieval was failing.
- Explaining the importance of page loading and providing a solution by adding a delay.
00:01 🌐 Understanding the Challenge with Clicking on a Specific State
- Selenium tries to click in the middle of an element by default, which works for most states.
03:50 🌐 Using the Actions Class to Click on a Specific Region
- Actions class allows you to move to a specific element and define X and Y offsets.
- By finding the center point of the element and adjusting the X offset, you can click on a desired region.
20:08 🌐 Clicking in the Middle of Elements After Selenium 3.4.x
- Selenium versions from 3.4.x onwards click on the middle of elements.
- Before that, they clicked on the corner of elements.
23:03 🌐 Moving a Slider Element to a Specific Position
- When clicking on a slider element, it clicks in the middle of the element.
- To move the slider to a specific position, calculate the width, find the center point, and adjust the X offset to control the movement.
- Positive X offset moves to the right, and negative X offset moves to the left.
50:41 📜 Capturing Page Inner Text
01:19:41 🔍 Scrolling with Selenium
- Learn how to scroll with Selenium.
- Different methods for scrolling.
- Explanation of scrolling in the vertical direction.
01:20:12 🌟 Scroll Into View Function
- Introduction to the scroll into view function.
- How to stop scrolling at a specific element.
- Basic usage of the scroll into view method.
01:25:10 🚫 Handling Barcode Captchas
- Explanation of why handling barcode captchas with automation is challenging.
- Suggested alternatives for dealing with captchas in automation.
- Discussing automation strategies for specific environments.
01:29:14 📜 HTML Tag Name and Title
- Understanding how to retrieve text from HTML elements using tag names.
- Differentiating between title elements and other web elements.
- Demonstration of retrieving title text with both tag name and XPath.
01:40:21 🔀 Handling Relative Locators
- Exploring the use of relative locators in Selenium.
- Discussion on locating elements to the left and right of a base element.
- Troubleshooting issues with relative locators in specific cases.
00:00 🌟 Introduction to Shadow DOM and its challenges
- Shadow DOM is an additional layer inside the DOM hierarchy.
- Shadow DOM elements are not directly accessible through traditional methods in Selenium.
- Limited support for Shadow DOM in Selenium; consider alternatives like Playwright for applications heavily relying on Shadow DOM.
- Demonstrated how to use ScrollIntoView to stop scrolling when a specific element (e.g., “popular items this season”) is in view.
25:05 🌟 Handling Placeholder Value with Get Attribute
- Explained how to retrieve the placeholder value of an input element using
- Useful for capturing and validating the placeholder value of an element.
- Demonstrated the process within the context of handling input fields.
- Key methods include
28:18 💡 Using
scrollIntoViewmethod helps scroll to an element within the viewport.
- It’s useful for focusing on specific elements, especially in one-page applications.
- This method is a fallback for clicking when other methods fail.
- It’s useful for specific scenarios but not recommended as a primary input method.
42:02 🪄 Handling Nested Iframes
- Demonstrates switching between nested iframes within a web page.
- Shows how to use
switchTo().frame()to navigate between frames effectively.
55:39 ⚙️ Explaining switching between frames
- Demonstrates how to switch between frames in Selenium.
- Highlights the concept of using parent frames to navigate nested iframes.
57:01 🕹️ Returning to the main page
- Discusses how to return to the main page or default content when working with nested iframes.
- Emphasizes the importance of following the hierarchy of frames.
58:05 🔍 Default content and parent frame methods
- Explains the concept of default content and parent frame methods in navigating nested iframes.
- Highlights the need to use the parent frame method to return to default content.
01:02:09 🏞️ Handling web table pagination
- Introduces the concept of handling web table pagination in Selenium automation.
- Demonstrates a while loop to navigate through pages and select specific elements.
01:13:34 🔄 Handling disabled “Next” button
- Explains how to handle cases where the “Next” button is disabled in web table pagination.
- Utilizes the class attribute to detect the button’s disabled state and break the loop when necessary
01:22:20 🔧 Handling pagination in a web table
- Discusses handling pagination in a web table when the number of entries may change.
01:22:48 📜 Checking functionality of the “Next” button
- Demonstrates checking the functionality of the “Next” button without causing exceptions.
01:23:30 🕒 Reducing unnecessary thread sleep time
- Optimizing the code by reducing unnecessary sleep time during pagination.
01:24:18 🔄 Handling pagination for different countries
- Discusses handling pagination for different countries in a web table.
01:25:11 🌍 Exploring single selection and multiple selection
- Explains the difference between single selection and multiple selection in a web table with pagination.
01:26:10 📄 Handling corner cases in web table pagination
- Discusses handling corner cases when elements are available on different pages.
01:27:18 📌 Assignment: Implement multi-selection for different pages
- Assigns a task to implement multi-selection for specific countries across different pages in the web table with pagination.
01:28:43 📚 Discussing different ways to select checkboxes
- Explores different methods to select checkboxes within a web table.
01:29:28 🧩 Validating the pagination completion
- Demonstrates how to validate that pagination is completed when no more countries are found.
01:31:45 📋 Handling page loading delays in Selenium
01:37:39 🌐 Handling nested frames using Actions class
- Discusses using the Actions class to interact with elements within nested frames.
01:44:39 🔲 Exploring frame navigation within nested frames
- Addresses navigating between nested frames, including using parent frame to move from child to parent frame.
01:46:24 🔄 Handling infinite loops in test cases
- Discusses the importance of handling conditions to avoid infinite loops, especially when executing a large number of test cases.
01:46:52 🕵️ Discussing testing scenarios for a web table
- Exploring positive and negative test cases for a web table,
- Determining the return values of a specific function based on test cases.
- Recommending alternative approaches for scrolling actions.
01:55:27 🌍 Discussing interaction with SVG maps
- Explaining how to interact with elements in SVG maps,
- Demonstrating how to locate and work with specific elements within an SVG map.
01:59:23 🖥️ Troubleshooting issues with element interactions in forms
- Addressing issues related to interacting with elements in a form,
- Discussing the need for using alternative methods like Action class for unpredictable behavior.
00:00 🛠️ Handling Multi-Selection in Web Table
- How to select multiple countries in a web table using XPath and Selenium.
- Creating a generic method for selecting multiple countries.
- Implementing pagination logic for handling multi-selection.
13:02 🌐 Handling Multi-Level Menus in Angular Applications
- Demonstrating how to perform a mouseover action on multi-level menus in an Angular-based application.
- Using the Actions class to handle menu interactions.
- Handling submenus and clicking on specific menu items.
26:06 🧐 Tips for Inspecting Elements in Angular Applications
- Troubleshooting element inspection in Angular applications.
- Using the debugger mode to prevent elements from disappearing during inspection.
- Additional tips for inspecting elements in web pages.
00:00 🕰️ Introduction to Weight in Selenium
- Understanding the need for synchronization in Selenium.
- Differentiating between Static and Dynamic weights.
- Exploring Implicit and Explicit weights.
06:12 📊 Implicit Weight in Selenium
- Discussing Implicit Wait as a global weight.
- Highlighting the disadvantages of Implicit Wait.
- Explaining when Implicit Wait might be used in Selenium.
10:45 🚀 Explicit Weight in Selenium
- Introducing Explicit Wait as a specific element weight.
- Discussing the hierarchy of Webdriver Wait and Fluent Wait.
- Mentioning the Until method and its implementation in Fluent Wait.
15:34 🧩 Weight Hierarchy in Selenium
- Describing the weight hierarchy in Selenium.
- Highlighting the relationship between Webdriver Wait, Fluent Wait, and the Weight interface.
- Emphasizing the implementation of the Until method in Fluent Wait.
18:56 🏗️ Conclusion and Recap
- Summarizing the key concepts related to weights in Selenium.
- Providing an overview of the weight hierarchy.
- Preparing for further discussions on Fluent Wait methods.
54:34 🕰️ Implicitly Wait in Selenium
- Implicitly wait is a global wait applied to all elements by default.
- It is specified in seconds and waits for an element to be present on the page before throwing an exception.
57:15 ⏳ Deprecated Method in Selenium 3
- Selenium 3 used a deprecated method to set implicitly wait with time units.
- Deprecated methods may not be available in future Selenium versions, so it’s best to avoid them.
58:55 ⏲️ Duration Class in Selenium 4
- In Selenium 4, implicitly wait should be set using the
Durationclass, which offers more flexibility.
- Duration allows you to specify the wait time in seconds, minutes, days, and more.
01:00:07 🌐 Implicit Wait Is Global
- Implicitly wait is applied globally to all elements on the page by default.
- Any element accessed using
driver.findElementwill have the implicitly wait applied.
01:12:42 🔒 Implicit Wait Not Suitable for Frameworks
- In test automation frameworks, it’s advisable not to use implicit wait.
- Excessive use of implicit wait in a framework can impact performance.
01:15:42 🚫 Implicit Wait and Non-Web Elements
- Implicit wait only works for web elements and doesn’t support non-web elements like alerts and page titles.
- When waiting for non-web elements, explicit wait should be used.
01:19:13 ⏱️ Thread.sleep and its function,
- Thread.sleep is used to pause the script for a specified time.
- It’s not related to WebDriver and simply adds a delay.
- If an element is found before the specified time, it proceeds; otherwise, it throws an exception.
01:20:51 ⏱️ Implicit and Explicit Waits,
- Implicit waits wait for a specified time for elements to be found.
- Explicit waits are used to wait for specific conditions to be met.
- Implicit waits are applied globally, while explicit waits are used for specific elements.
01:21:36 🏎️ Auto Weight vs. Implicit Wait,
- The concept of Auto Weight is similar to Implicit Wait.
- Selenium offers an internally provided Implicit Wait.
- Using Implicit Wait, Selenium checks for elements before performing actions.
01:22:47 ⚡ Performance of Selenium vs. Cypress,
- Selenium is faster than Cypress in terms of performance.
- While Cypress may appear fast, it runs test cases inside the browser, which can slow down execution.
- Tools based on Selenium, like Webdriver IO and Selenide, follow W3C standards, making Selenium a popular choice in the automation community.
01:24:17 ⏲️ Handling Failures in Test Scripts,
- If a step fails, subsequent steps related to it will also fail.
- It’s possible to implement retry logic with tools like TestNG to reattempt failed steps.
- Handling failures is part of test script design and logic.
01:26:29 🛠️ Upcoming Framework Topics,
- The upcoming topics in the course include TestNG, data-driven testing, Maven, Jenkins, GitHub, Nexus, and more.
- The framework will cover a wide range of advanced topics, including Docker containers, AWS, and Selenoid.
- The focus is on providing a comprehensive and up-to-date understanding of automation tools and techniques.
00:01 🕰️ Introduction to Implicit Wait
- Implicit wait’s drawbacks, global application, and non-web elements limitation.
01:23 ⏲️ Using Implicit Wait in Selenium
- Demonstrating the application of implicit wait in a Selenium script.
03:00 🛠️ Exception Handling with Implicit Wait
- Observing how implicit wait handles exceptions for missing elements.
04:19 🔒 Explicit Wait for Specific Elements
- Introduction to explicit waits and the need for them.
07:48 🧰 Creating a Custom Explicit Wait Utility
- Creating a custom method for explicit wait to wait for specific elements with a given timeout.
18:55 👥 Utility Methods for Element Interaction
- Demonstrating the use of utility methods for element interaction with and without explicit wait.
22:02 🌟 Visibility of Element Located
- Introducing the visibility of element located method, its definition, and its significance.
25:36 🧩 Organizing Wait Utility Methods
- Preparing to organize the wait utility methods in a separate class.
25:57 🕰️ Introduction to waiting for non-web elements
- You can apply Webdriver with non-web elements and explicitly wait for them.
- Waiting for non-web elements is essential when dealing with elements like alerts.
- Using Webdriver Wait with expected conditions like alert is present can ensure you wait for pop-ups.
28:59 ⏳ Creating utility methods for handling alerts
- You can create utility methods to wait for alerts, get their text, accept or dismiss them.
- These utility methods can streamline alert handling without repetitive code.
34:32 🔐 Waiting for the title of a web page
- It’s essential to wait for the title of a web page to ensure it’s fully loaded.
- You can create utility methods to wait for specific titles or title substrings before proceeding with your script.
52:02 🆚 Verifying full and partial titles
- Creating utility methods for both full and partial title verifications gives flexibility in title checking.
wait for title containsfor partial title matching and
wait for title isfor full title matching when waiting for a specific page state.
53:31 🕒 Explicit Wait Overview
- Explicit wait can be applied to elements and non-web elements.
- It eliminates the need for implicit waits and provides better control.
54:24 🕒 Wait for Title with Explicit Wait
- Explicit wait can be used for waiting until the title of a web page matches an expected value.
- Storing title checks in a Boolean variable is unnecessary; exceptions are raised if the condition is not met.
55:48 🕒 Waiting for URL with Explicit Wait
- Explicit wait can also be applied to waiting for specific URL content.
- The utility for URL waiting can be customized to fetch the URL or simply check if it contains a specific value.
58:33 🕒 Customized Utility for URL Validation
- Creating a custom utility for URL validation allows you to control whether to fetch the URL or check for a specific value.
- You can use explicit wait with the URL content to determine if the URL meets your criteria.
01:02:17 🕒 Applying Explicit Wait to Non-Web Elements
- Explicit wait can be applied to non-web elements like alerts, titles, and URLs.
- It offers flexibility in automating different scenarios, including waiting for browser pop-ups.
01:07:04 🕒 Overloading the Get Element Method
- You can overload the
get elementmethod to include explicit wait based on the timeout.
- This approach provides flexibility in automation by choosing whether to use implicit wait-like behavior.
01:20:28 🕒 Fixing Stale Element Reference Exception
- Stale element reference exceptions can occur when an element changes state or location.
- The error may be due to refreshing the page or manipulating the DOM structure. Properly locate the elements to avoid this issue.
01:24:00 🤔 Troubleshooting Shadow DOM Issues
- Troubleshooting an issue with Shadow DOM and JS path identification.
- Removing unnecessary code and fixing an “unexpected token” error.
- Ensuring the correct JS path is used and addressing spacing issues in the script.
01:26:19 🕰️ Debugging and Correcting Script Errors
- Identifying and fixing script errors.
- Addressing issues with leading spaces in the script.
- Understanding the importance of script cleanliness.
01:29:20 🖥️ Maximizing Screen and Zooming in Selenium
- Discussing the practice of maximizing the screen.
- Clarifying that maximizing the screen doesn’t affect location-based operations.
01:31:11 ⏲️ Dynamic Waits and Explicit Wait in Selenium
- Differentiating dynamic waits from explicit waits.
- Understanding that dynamic waits adapt to element appearance.
- Highlighting that explicit waits wait for a fixed duration regardless of element availability.
01:34:30 👆 Mouse Movement and Actions Class in Selenium
- Explaining how the Actions class works for moving the mouse.
- Clarifying that move to element centers the mouse on the target element.
- Emphasizing that actions like click include automatic movement to the element.
01:36:03 🔍 Zooming in and Out in Selenium
- Explaining that actions class and keys may not always work for zooming.
01:40:25 ⚠️ Troubleshooting Timeout Exception in Selenium
- Analyzing a timeout exception in Selenium script.
- Explaining the issue with checking for alert presence.
- Advising against using “equals to null” for alert presence check.
00:01 ⌛ Overview of WebDriver Weight Utilities
- An introduction to the various WebDriver weight utilities.
- Explanation of waiting for web elements and their visibility.
02:21 🕐 Waiting for a List of Elements
- Demonstrates how to wait for multiple web elements, like footers or links.
- Shows how to use the presence of all elements located by method to handle such cases.
05:50 📊 Waiting for Element Visibility
- Explains the visibility of all elements located by method to ensure all elements are not only displayed but also have height and width greater than zero.
- Contrasts it with the presence of all elements located by method.
10:12 🖼️ Waiting for Frames
- Describes how to wait for frames to load on a page using different methods.
- Includes waiting for frames by name or ID, index, element, and locator.
24:08 🖱️ Waiting for Clickable Elements
- Introduces the concept of waiting for elements to become clickable using element to be clickable method.
- Shows how to wait for a specific element to be both visible and enabled before clicking it.
27:37 🕒 Understanding FluentWait and its relation to WebDriverWait
- FluentWait is a class that extends the Wait interface and is closely related to WebDriverWait.
- You can use FluentWait to wait for specific conditions and customize the polling interval.
44:12 🔄 Using FluentWait with WebDriverWait
- FluentWait is essentially an extended version of WebDriverWait, so you can directly use FluentWait for waiting in Selenium.
- You can specify the total timeout, interval time (polling time), and exceptions to ignore while waiting.
50:14 ⏲️ Understanding Polling Time in Waiting
- Polling time (interval time) is the time interval between each check for a condition during a wait.
- By customizing the polling time, you can control how frequently Selenium checks for the condition.
- These sections provide insights into FluentWait, its relationship with WebDriverWait, and the concept of polling time in waiting during Selenium automation.
54:56 ⏳ Explanation of Polling Time and Interval Time
- Polling time or interval time is the time between two requests sent to the browser.
- You can customize the polling time to optimize your automation process.
57:27 🕵️ Defining a FluentWait Utility
- You can create a utility method for FluentWait to simplify waiting for specific elements.
- This method allows you to customize the timeout, polling time, and handling of exceptions.
59:47 🧐 Handling Stale Element Reference Exception
- You can use FluentWait to handle Stale Element Reference Exception by specifying the elements to ignore for a certain duration.
- This approach is useful for robust element identification.
01:03:41 🔄 Creating a Utility for FluentWait
- You can create a utility for FluentWait to easily wait for different types of elements, like alerts, URLs, titles, or frames.
- The method allows you to customize the timeout, polling time, and message for each type of element you are waiting for.
01:15:22 🚀 Using Fluent Features in WebDriverWait
- You can use the FluentWait features even with a regular WebDriverWait object by explicitly applying them.
- There’s no fundamental difference between WebDriverWait and FluentWait; it’s about how you use the features.
01:20:50 💡 Explaining the Difference between WebDriverWait and FluentWait
- When explaining the difference in an interview, start by describing the hierarchy and inheritance of FluentWait and WebDriverWait.
- Emphasize that FluentWait is an extension of WebDriverWait, allowing you to use additional features like ignoring exceptions and custom messages.
01:22:36 🚗 Troubleshooting FluentWait in Selenium
- Understanding FluentWait’s behavior,
- Configuring FluentWait with a timeout and polling interval,
- Handling exceptions using FluentWait.
01:28:10 🤔 Using Try-Catch with Selenium
- Discussing when to use Try-Catch with Selenium,
- Exploring scenarios where Try-Catch is not needed,
- Customizing exception handling in Selenium.
01:40:04 🐜 Debugging and Troubleshooting Selenium Code
- Analyzing issues in Selenium code and debugging,
- Discussing the use of different locators and actions,
- Demonstrating how to identify and address problems in code.
00:03 📅 Understanding the Calendar Handling Scenario
- Explains how to interact with a calendar and select dates.
- Discusses the challenge of selecting future dates.
- Introduces the need for a while loop to handle date selection.
03:06 🚀 Writing the Initial Code for Calendar Handling
- Demonstrates writing the initial code for opening a calendar and selecting a date from the current month.
- Discusses using CSS selectors to interact with elements.
- Shows how to create a generic method for selecting a specific date.
07:43 🗂 Exploring Calendar Structure for Date Selection
- Examines the structure of the calendar, including tables and rows.
- Discusses how to capture and interact with date elements.
- Highlights the potential for a more efficient method for selecting dates.
13:06 ⏩ Handling Future Date Selection
- Explains the approach for selecting future dates in the calendar.
- Introduces a while loop to iterate through months.
- Demonstrates how to update the expected and actual month and year.
25:02 🛠️ Creating a Generic Method for Future Date Selection
- Shows how to create a generic method for selecting future dates.
- Discusses the parameters for expected month and year, and the specific day to be selected.
- Demonstrates error handling to avoid selecting invalid dates.
29:13 📅 Calendar Handling in Selenium
- Handling calendar logic and date selection,
- Explained the need for validating date inputs and avoiding unnecessary processing.
31:09 📆 Handling February and Leap Year
- Addressed handling February and leap year scenarios,
- Demonstrated additional checks for February and leap year in the calendar logic.
38:14 🗓 Calendar Handling Practice
- Presented a practical exercise on selecting future and previous dates in a dynamic calendar,
- Emphasized the importance of practicing with dynamic calendars, considering possible changes.
44:08 🕒 Capturing Disabled Dates
- Discussed capturing disabled dates in a dynamic calendar using CSS selectors,
- Demonstrated the usage of “not” in CSS selectors to filter out disabled dates and retrieve enabled dates.
57:58 🗓️ Calendar Handling in Selenium
- Discussion on handling calendars in Selenium.
- Emphasis on the importance of handling corner cases in date selection.
- Using a generic method approach for working with different date parameters.
58:57 🧪 Test Cases for Date Handling
- Creating test cases for date handling in Selenium.
- Demonstrating test cases with various date parameters, including February 29th.
- Highlighting the need to consider the number of days in different months.
01:00:03 🐞 Handling a Date Logic Bug
- Identifying and addressing a logic bug related to date handling.
- Discussing the importance of considering the number of days in a specific month.
- Suggesting the addition of conditions to handle different months effectively.
01:01:58 📅 Date Handling for Different Months
- Discussing how to handle date logic for different months efficiently.
- Suggesting a pseudo code approach to manage months with 30 and 31 days.
- Proposing conditions to handle date selection based on the month’s characteristics.
01:06:00 🚀 Upcoming Sessions and Selenium TestNG
- Announcing plans to cover TestNG framework in upcoming sessions.
- Mentioning the intent to address infinite scrolling and other topics.
- Exploring possible scenarios and test cases for Selenium automation.
00:03 🚀 Using different character sequences with Selenium sendKeys method
- You can use character sequences other than strings with the sendKeys method in Selenium.
- The string Builder class is a viable option for creating character sequences.
- When passing character sequences, ensure they are not null to avoid exceptions.
03:47 ⚠️ Avoid passing null character sequences
- Passing null character sequences to the sendKeys method will result in an illegal argument exception.
- RemoteWebElement class includes a null check to prevent null character sequences.
- Always ensure your character sequences are not null when using sendKeys in Selenium.
00:00 🎮 Introduction to Keyboard Actions in Selenium
- Learn how to perform keyboard actions using Selenium.
- Understand the need for keyboard actions when dealing with capital letters in web forms.
- Introduction to the
Actionsclass in Selenium for keyboard actions.
03:28 📝 Simulating Copy-Paste Actions with Selenium
- Discover how to simulate copy-paste actions using Selenium.
- Learn to use the
Actionsclass to perform keyboard actions for copying and pasting.
- Understand the key steps to achieve copy-paste functionality in Selenium.
05:45 🔄 Scrolling with Keyboard Actions in Selenium
- Learn how to scroll using keyboard actions with Selenium.
- Understand the use of the
send keysmethods for scrolling.
- Perform scrolling to the bottom and top of a web page with Selenium.
08:53 🔄 Refreshing a Page with Keyboard Actions
- Discover how to refresh a web page using keyboard actions in Selenium.
- Learn to simulate the F5 key press to refresh a page.
- Understand the use of
key downmethods for refreshing a page with Selenium.
00:01 🐒 Understanding Monkey Testing
- Monkey testing involves randomly testing a website by clicking on various elements and using random inputs.
- The goal is to identify unexpected issues or bugs in the system.
01:14 🗺️ Heat Maps for User Behavior
- Heat maps provide a graphical representation of user activity, highlighting the most used areas on a website.
- They help determine where users are clicking and interacting the most.
05:25 🤖 Automating Monkey Testing with Selenium
- Automating monkey testing with Selenium involves collecting links from specific sections of a website, such as the footer.
- Randomly selecting links, clicking on them, and returning to the main page is a way to simulate user interaction for testing.
13:57 🔄 Randomly Simulating User Clicks
- The script demonstrates randomly simulating user clicks on links within the footer section.
- By generating random indexes and clicking on links, you can mimic the behavior of users during monkey testing.
00:00 🖥️ Introduction to Zooming in Web Pages
- Introduction to zooming in web pages and the need for changing zoom levels.
- Mentioned using Ctrl+/- or Command+/- to zoom in and out in browsers.
03:25 🚀 Implementing Zoom Control in Selenium
- Explained the process of implementing zoom control in Selenium by creating a generic function.
- Highlighted the ability to dynamically change the zoom level as needed.
05:44 🦊 Firefox-Specific Zoom Control
- Addressed the difference in zoom control for Firefox using “Moz transform” and “scale” properties.
- Demonstrated how to handle zooming in Firefox as a separate case.
08:46 🌐 Compatibility with Different Browsers
- Mentioned that the zoom control methods work for various browsers like Edge, Safari, and Chrome.
- Highlighted the need to maintain separate scripts for Firefox.
10:23 🛠️ Creating Generic Zoom Control Methods
- Demonstrated the creation of two generic methods, “Zoom Chrome” and “Zoom Firefox,” for zoom control.
- Showed how to use these methods with different zoom percentages for Chrome and Firefox.
00:00 🚀 Introduction to TestNG and its importance in test automation,
- TestNG is a unit testing framework primarily used with Java,
- TestNG is essential for organizing, prioritizing, and managing test cases in automation.
03:13 🛠 Features and capabilities of TestNG,
- TestNG supports running test cases in parallel, providing efficient execution of tests,
- It allows creating data-driven tests with the help of data providers,
- TestNG offers annotations like @BeforeSuite, @BeforeTest, @BeforeClass, @BeforeMethod for setting up preconditions.
08:55 📦 Adding TestNG to a Maven project and Eclipse,
- Add TestNG as a Maven dependency in the pom.xml file,
- Install the TestNG plugin in Eclipse to enable test execution with TestNG.
15:21 🧪 Designing TestNG test methods and preconditions,
- Use annotations like @BeforeSuite, @BeforeTest, @BeforeClass to set up global preconditions,
- Design individual test methods using the @Test annotation, followed by validation logic,
- Implement post-conditions using @AfterMethod, @AfterClass, and @AfterTest annotations.
25:07 📋 Writing multiple test cases in a TestNG class,
- You can create multiple test cases within a TestNG class by adding multiple @Test annotations,
- Each test case method can have its unique name and validation logic,
- TestNG allows organizing and executing multiple test cases efficiently in a single class.
25:21 📋 Overview of TestNG Annotations
- Explanation of TestNG annotations, including @Test, @BeforeTest, @BeforeMethod, and @AfterMethod.
- Clarification that the number of @Test annotations in a TestNG class determines the number of test cases.
- Emphasis on the flexibility of method placement in the class.
30:51 🛠️ Designing Test Cases with TestNG Annotations
- Demonstrating the use of TestNG annotations to set up and execute test cases.
- Creation of a class with @BeforeTest, @BeforeMethod, and @Test annotations.
- Explanation of the execution sequence of annotations and the concept of alphabetical order for test case execution.
52:07 ⚙️ Discussing test case organization
- Importance of organizing test cases feature-wise.
- Problems with combining multiple features in a single test method.
- Ensuring test cases are independent of each other.
59:11 🧩 Browser launch and test execution strategies
- Comparing the “before test” and “before method” approaches for browser management.
- Using “before test” for stable applications or sanity testing.
- Utilizing “before method” for regression testing with a large number of test cases.
- Considerations for end-user scenarios and parallel execution.
01:18:08 🧭 TestNG Priority in Test Execution
- Understanding how to set priorities for test methods in TestNG.
- Demonstrating the execution sequence based on different priorities.
01:20:31 🧪 Triple A Rule in Unit Testing
- Explaining the Triple A rule, which stands for Arrange, Act, and Assert, in unit testing.
- Emphasizing the importance of arranging test cases properly and writing assertions for meaningful tests.
01:43:56 🚀 Troubleshooting issues with elements in the DOM
- Observations about using different element locators like “by.linkText” and “by.tagName.”
- Exploring why a particular element isn’t working as expected.
01:44:14 💡 Maximizing the window and handling menu patterns
- Discussing how maximizing the window can affect element interaction.
- Addressing issues related to menu pattern changes.
01:45:33 📚 Troubleshooting installation and compatibility issues
- Providing guidance on handling installation and compatibility problems.
- Assuring that the installation won’t affect existing programs.
01:47:10 📈 Practicing complex scenarios and problem-solving
- Encouraging practice with challenging scenarios to gain confidence.
- Emphasizing the importance of handling different scenarios.
01:54:41 🕰️ Exploring FluentWait behavior and custom messages
- Discussing FluentWait behavior with invalid locators and waiting duration.
- Addressing issues related to custom error messages.
02:01:13 🛠️ Adapting to changes in project requirements
- Advising on adapting to changes in project requirements.
- Discussing the potential transition from one testing framework to another.
02:04:29 🥒 Evaluating the adoption of Cucumber in the project
- Considering the adoption of Cucumber in the existing framework.
- Discussing the potential impact and reasons for transitioning.
02:06:03 🤔 Questioning the need for framework changes
- Encouraging critical evaluation of framework changes.
- Highlighting the importance of understanding the reasons behind such decisions.
00:03 🧪 Introduction to TestNG features and an email about TestNG installation issues.
- Discussion about TestNG and installation problems.
- Mention of someone facing issues with TestNG installation.
00:18 🧬 Recap of the previous session and a new TestNG class creation.
- Recap of previous session, focusing on TestNG features.
- Creation of a new TestNG class for further examples.
01:14 📌 Using the
@Test annotation and expected exceptions in TestNG.
- Explanation of using the
@Testannotation without before and after methods.
- Demonstrating the use of
expectedExceptionsto handle exceptions in TestNG.
03:00 ⚙️ Setting expected exceptions and handling different exception types.
- Discussing the use of
expectedExceptionsto handle various exception types.
- Demonstrating how specifying exceptions can impact test outcomes.
04:56 🔢 Using priorities with TestNG to control test execution order.
- Introduction to setting priorities for test methods.
- Exploring the order of execution based on priorities.
06:57 🤔 Handling test methods with the same priority and their execution order.
- Explanation of handling multiple test methods with the same priority.
- Demonstrating how TestNG chooses the order in such cases.
09:36 ❌ Avoiding negative priorities for test methods in TestNG.
- Emphasizing not to use negative priorities for test methods.
- Highlighting that negative priorities can create confusion.
11:43 🚫 Avoiding unnecessary dependencies between test methods in TestNG.
- Discussing the pitfalls of creating dependencies between test methods.
- Explaining the importance of keeping test cases independent.
19:41 🔄 Best practice: Keeping test cases independent in TestNG.
- Reinforcing the best practice of maintaining independent test cases.
- Suggesting an alternative approach to organizing tests to avoid unnecessary dependencies.
27:06 🔐 Avoid creating unnecessary dependencies between test cases:
- Dependency between test cases can lead to issues when one test fails and affects the execution of others.
- It’s a bad practice to have test cases reliant on each other, as it limits flexibility and can cause problems in parallel execution.
28:06 📚 The right way to design test cases for CRUD operations:
- For Create User: First, create the user and then immediately get the same user to verify.
- For Update User: Create the user, get the user, update the user, and then get the user again to ensure the update is correct.
- For Delete User: Create the user, get the user to verify its creation, then delete the user, and finally, check if getting the user results in a 404 error, confirming deletion.
30:30 🔄 Advantages of designing independent test cases for CRUD operations:
- Independent test cases allow parallel execution without issues of test case sequence.
- You can easily skip specific test cases when needed without affecting others.
- Test cases are more robust and adaptable to different environments and data.
44:47 🔄 Utilizing TestNG’s
@Test(invocationCount) for load testing:
- You can use the
@Test(invocationCount)annotation to run the same test multiple times for load testing.
- This is helpful for performance testing by generating multiple instances of the same test to simulate load on the system.
46:03 🔍 Designing negative test cases with TestNG and Selenium:
- Negative test cases can be created to test scenarios with incorrect or invalid input.
- Using the
doLoginmethod, you can input wrong data, click the login button, and capture the error message.
- Assertions can be applied to check if the error message matches the expected result.
51:51 🖊️ Understanding and using CSS selectors:
- CSS selectors can be used to locate elements on a web page based on their attributes and class names.
- Multiple classes can be combined in a CSS selector by using dot notation (e.g.,
- Using CSS selectors helps in efficiently locating and interacting with elements in Selenium WebDriver.
55:03 📝 Using TestNG Data Providers for Parameterization
- Data-driven testing with TestNG,
- Creating a data provider method to supply test data for parameterization,
- Mapping the data provider to the test method.
57:22 🧩 Designing Data Provider for Registration Test
- Creating a data provider for a registration test with multiple rows and columns.
01:18:19 💡 Homework: Using Data Providers for Search and Product Selection
- Applying data provider for search and product selection scenarios in a test.
00:00 📋 Introduction to TestNG and common issues in running multiple test classes
- Discusses the need for a test runner for multiple test classes.
- Introduces the concept of creating a TestNG XML file to bundle test classes.
- Explains the purpose of the
verboseattribute in TestNG XML.
08:15 🧬 Creating a Base Test Class to avoid duplicate code in test classes
- Demonstrates the creation of a base test class to centralize common code.
- Shows how to extend test classes from the base test class.
- Explains the significance of the
@AfterTestmethods in the base class.
21:05 🚀 Running test classes using the TestNG XML file
- Shows how to run test classes using the TestNG XML file.
- Discusses the use of priorities in test methods to control their execution order.
- Demonstrates the inheritance structure of TestNG tests.
24:56 🚀 Running TestNG Tests and Common Code in Base Test
- Creating a base test class to store common code for all test classes.
- Running test cases using TestNG from individual classes and TestNG XML.
27:06 🧩 TestNG Parameterization for Environment Variables
- Demonstrating how to pass parameters from a TestNG XML file to test classes.
- Parameterizing environment-specific data, such as URLs, using the @Parameters annotation.
33:31 ⚙️ Implementing Cross-Browser Testing
- Parameterizing the browser type to enable cross-browser testing.
- Configuring TestNG to run tests in parallel with multiple threads, improving test execution speed.
50:14 🔄 Understanding Parallel Execution Threads
- Explanation of how TestNG allows running multiple test blocks in parallel using thread count.
- Discussing the number of threads, their independence, and the impact on test execution time.
51:49 ⚙️ Understanding Thread Count in TestNG
- Thread count determines how many threads are generated for test execution.
- Using too many threads can lead to inefficiency and resource consumption.
54:03 📈 Ideal Thread Count for Test Execution
- There is no fixed ideal thread count, but it should match the number of test cases effectively.
- A reasonable practice is to use a thread count that matches the number of test cases.
56:35 🧩 Creating Multiple TestNG XML Files for Browser Configurations
- You can create multiple TestNG XML files to configure different browser combinations for test execution.
- This allows you to run tests on specific browsers without altering the main test configuration.
01:11:26 📊 Rerunning Failed Test Cases with TestNG
- TestNG generates an XML file for failed test cases, which you can rerun to check which tests failed again.
- This helps you focus on and debug the specific failures.
01:13:23 💡 Benefits of Parallel Test Execution
- Parallel execution significantly reduces test execution time, making it more efficient.
- It is a fundamental practice in test automation to support parallel execution.
01:16:30 📊 Understanding TestNG Parallel Execution
- TestNG requires both “parallel” and “thread count” parameters for parallel execution.
- Without specifying a thread count, TestNG defaults to single-thread execution.
- The best practice is to use “thread count” in conjunction with “parallel” for parallel test execution.
01:17:39 💡 Determining Thread Count for Parallel Testing
- Thread count should be based on the machine’s configuration and capacity.
- Higher thread counts can lead to increased memory usage and performance issues.
- There’s no one-size-fits-all answer for the ideal thread count.
01:19:36 🚀 Thread Local for Driver Instance Maintenance
- Thread local is used to manage driver instances for parallel testing.
- Sharing a single driver instance among multiple tests can cause problems.
- Thread local provides each test with a unique copy of the driver.
01:21:44 🧩 Configuring Parallel Testing in TestNG
- To run tests in parallel, both “parallel” and “thread count” parameters should be set.
- You can set “parallel = test” at the test level to run multiple methods in parallel.
- Parallel execution settings are done at different levels in TestNG XML files.
01:23:09 📂 Handling TestNG Reports
- TestNG generates HTML reports under the “test-output” folder.
- The latest execution’s report overwrites the previous one in the same folder.
- Backing up reports or using Jenkins can help manage report history effectively.
00:00 📝 Introduction to building a testing framework with TestNG
- Discusses the need to design a framework for efficient testing.
- Mentions the importance of considering various components such as data, test cases, and locators.
02:10 🧩 Framework structure: Two main parts
- Describes the framework structure, divided into two parts: DevOps activities and framework development.
- Highlights the need to have a proper infrastructure for framework execution.
03:07 🏗️ Designing a hybrid framework
- Introduces the concept of a hybrid framework.
- Explains the usage of data-driven and keyword-driven approaches in real-time projects.
04:44 📦 Page Object Model (POM) as a design pattern
- Clarifies the distinction between Page Object Model (POM) as a design pattern, not a framework.
- Emphasizes the significance of following POM’s design rules and regulations.
06:08 📁 Project setup: Maven project
- Discusses the choice of creating a Maven project to manage dependencies efficiently.
- Highlights the importance of maintaining a pom.xml file for project configuration.
07:45 🔧 Driver Factory and initialization
- Describes the role of the Driver Factory class in initializing the web driver.
- Mentions the need to define global properties for configuring the driver.
- Clarifies that these utilities are part of the page layer.
10:27 📊 Test Data Management
- Introduces the concept of managing test data.
- Specifies the use of Apache POI for reading data from Excel files and how data providers work.
13:18 📜 Logging and Reporting
- Discusses the need for logging and reporting in test automation.
- Highlights the use of Log4j for custom logging and extends reporting for generating detailed test reports.
16:35 🏃 Running Test Cases and Parallel Execution
- Explains the creation of test runners using TestNG XML files for running test cases.
- Discusses parallel execution configurations, thread count, and parameters.
21:56 💼 GitHub Integration
- Emphasizes the importance of maintaining code in a GitHub repository for version control and sharing.
- Offers to guide viewers on creating and using a GitHub account for code management.
22:40 🌐 Creating a Common Infrastructure
- The need for a common infrastructure to run test cases efficiently.
- Introducing the concept of using Jenkins for test automation.
23:36 🤖 Setting Up Jenkins and Selenium Grid
- Exploring how to create Jenkins jobs and pipelines.
- Mentioning the use of Jenkinsfile and declarative pipeline syntax.
25:04 ☁️ Setting Up Selenium Grid on AWS
- Discussing the need for a cloud-based environment for running tests.
- Referring to the use of AWS (Amazon Web Services) for setting up the Selenium Grid.
29:41 📦 Designing the Test Automation Framework
- Emphasizing the importance of designing the test automation framework.
- Touching on the usage of GitHub and NGROK proxy for code triggering and automation.
37:07 🧩 Creating Maven Project and Packages
- Explaining the process of creating a Maven project for the framework.
- Discussing package naming conventions and the separation of test and page layers.
42:20 🚗 Implementing Driver Factory
- Creating a driver factory class to manage the WebDriver instances.
- Demonstrating how to initialize the driver based on browser choice.
Please note that the timestamps provided are for reference, and you can access the corresponding sections in the video by clicking on the links.
46:01 🚗 Setting Up Driver and Launching URL
- Setting up the WebDriver and maximizing the browser window.
- Directly launching the URL without using implicit waits.
- Returning the driver as a web driver.
47:26 📂 Page Object Model Structure
- Discussing the structure of a Page Object Model class.
- Maintaining private By locators for page elements.
- Creating private By locator instances for page elements like username, password, and login button.
54:42 🔒 Encapsulation in Page Object Model
- Explaining encapsulation in the Page Object Model.
- Keeping locators private to restrict direct access.
- Using public methods to access page elements via the private locators.
59:38 ⚙️ Setting Up Base Test and Writing a Test Case
- Creating a base test class to initialize the driver.
- Writing a test case to verify the login page title.
- Inheriting the login page reference from the base test class for efficient object management.
01:10:42 🚀 The importance of a common login page in the framework
- In a test framework, a common login page serves as a starting point for test execution.
- The login page reference is created and used as a common location for login-related actions.
01:11:16 📝 Understanding access modifiers in Java (public and default)
- Access modifiers like public and default affect the visibility of methods and variables in Java.
- Default access is used when no access modifier is specified.
- Using “public” explicitly makes a method or variable accessible from any class.
01:11:49 📊 Implementing validation and assertion in test cases
- Validation and assertion are crucial for complete test cases.
- Assertions are used to compare actual and expected results in a test.
- Completing a test involves capturing a value and validating it against expected results.
01:12:50 🛡️ Avoiding assertions within page classes in the Page Object Model
- Page classes in the Page Object Model should not contain assertions.
- Assertions are the responsibility of test classes.
- Separation of concerns is essential in the Page Object Model.
01:14:28 📖 Reference to Martin Fowler’s Page Object Model guidelines
- Martin Fowler’s guidelines emphasize the importance of encapsulation and access control.
- Page objects should encapsulate the details of the UI structure.
- Test cases should avoid direct use of automation methods, following the Page Object Model principles.
01:24:45 🧐 Page Object Model suitability for web, mobile, and API testing
- The Page Object Model is suitable for both web and mobile testing.
- It’s not applicable to API testing, as APIs don’t have a UI structure.
- The key is maintaining a single driver instance and page chaining for seamless navigation.
00:00 🏁 Overview of Framework Design
- A quick revision of the framework structure.
- Mention of parallel execution challenges and test engine issues.
- Importance of maintaining the same driver instance throughout the execution.
05:06 📄 Creating a Page Class
- Discussion on creating a new page class for the accounts page.
- Introduction to test-driven development (TDD) approach.
- Creating locators and page actions for the accounts page.
20:03 🔐 Designing Test Class for the Accounts Page
- Addressing the challenge of login page impacting non-login test features.
- Implementing a specific setup method for the accounts page test.
- Reusing the existing
doLoginmethod from the base test to perform login.
23:59 🏁 The instructor discusses the method for logging in and returning an Accounts Page class reference.
- Explains the purpose of the “do login” method.
- Emphasizes the need to store the returned class object reference in the “account page” reference.
- Suggests creating a protected “account page” reference in the base test for code reusability.
26:23 🧭 The instructor sets up a test method for the Accounts Page class.
- Demonstrates how to call methods from the Accounts Page class using the reference obtained from the “do login” method.
- Shows how to assert the title of the page after logging in.
28:22 🛠️ The instructor creates a test method to check the existence of the “logout” link on the Accounts Page.
- Explains how to use the “account page” reference to call the “logout link exists” method.
- Demonstrates the use of the “assertTrue” method to verify the presence of the logout link.
31:14 📜 The instructor writes a test method to validate the headers on the Accounts Page.
- Shows how to call the “account page headers” method using the “account page” reference.
- Uses the “assertEquals” method to check if the number of headers matches the expected count.
45:52 🪛 The instructor integrates the ElementUtil class into the framework for handling elements.
- Explains the need to use ElementUtil for waiting and interacting with web elements efficiently.
- Demonstrates replacing the direct driver interactions with ElementUtil methods in the Login Page class.
49:17 🕒 Setting Up Constants for Timeouts
- Introducing constants for default timeouts (short, medium, long) in the app.
51:41 🔐 Using Constants for Page Titles and URL Fraction Values
- Using constants for page titles and URL fraction values to eliminate hardcoded values.
01:11:43 📐 Encapsulating Constants in the Framework
- Demonstrating encapsulation by keeping constants within the same class to ensure easy maintenance.
01:15:19 🌐 Discussing setting timeouts in test cases.
- Setting timeouts for test cases.
01:15:35 ⚙️ Configuring login page tests and environment variables.
- Configuring login page tests with environment variables.
01:16:08 📝 Referring to app constants for verification.
- Using app constants for verification.
01:17:07 📊 Discussing test case order and priorities.
- Managing test case order and priorities.
01:19:00 📋 Explaining how priorities affect test execution order.
- Understanding how priorities impact test execution order.
01:20:56 🧐 Discussing different types of data and where to store them.
- Differentiating between test data, constant data, and configuration data and where to store them.
01:21:42 🔧 Explaining the drawbacks of maintaining locators in Excel files or properties files.
- Highlighting the drawbacks of storing locators in Excel or properties files.
01:24:29 🗄️ Discussing data storage and avoiding external dependencies.
- Emphasizing the importance of maintaining data within the same page class and avoiding external dependencies.
01:31:25 📦 Clarifying the different types of data and their storage.
- Clarifying the distinctions between test data, constant data, and configuration data and where to store them.
01:34:09 🖥️ Explaining the sequence of test execution in TestNG.
- Explaining the sequence of test execution in TestNG.
01:35:04 🔗 Describing the use of page chaining for navigating through multiple pages.
- Describing the concept of page chaining for navigating through multiple pages.
01:38:00 🚀 Discussing future topics and continuing with page chaining models.
- Discussing upcoming topics and continuing with page chaining models.
01:39:48 🪔 Addressing an issue related to ChromeDriver and system properties.
- Troubleshooting an issue related to ChromeDriver and system properties in TestNG.
01:40:35 🔒 Suggesting a solution to the ChromeDriver issue involving permissions.
- Suggesting a solution for resolving the ChromeDriver issue related to permissions.
01:40:48 🚫 Troubleshooting a ChromeDriver issue.
- Troubleshooting a ChromeDriver issue related to permissions.
00:29 🛠️ Setting Up a Config File
- Creating a config.properties file to store environment and configuration data.
- Storing properties like browser choice, URL, incognito mode, and more in the properties file.
07:20 📄 Initializing Properties in Code
- Creating a method to initialize and load properties from the config.properties file.
- Using the Properties class to read key-value pairs from the properties file.
15:19 🔀 Passing Properties to Other Classes
- Passing the properties object as a parameter to other classes to access configuration data.
- Demonstrating how to use properties to remove hard-coded values in your code.
24:27 🖥️ Configuring Chrome options for Headless and Incognito modes
- Creating an
OptionsManagerclass to manage browser-specific options.
- Implementing methods to get Chrome, Firefox, and Edge options.
- Using the
prop(properties) object to determine whether to run tests in Headless or Incognito mode.
30:04 🚀 Applying Chrome options for Headless and Incognito modes
- Incorporating headless and incognito mode based on property settings.
- Simplifying the code structure to manage browser-specific options effectively.
48:09 🌐 Extending options management to Firefox and Edge
- Expanding the
OptionsManagerclass to handle Firefox and Edge browser options.
- Providing flexibility to add more browser options in the future by creating browser-specific methods.
This format separates and highlights the key topics discussed in the provided transcript, making it easier to grasp the main ideas and the progression of the explanation.
51:55 💡 Designing a Selenium framework requires thoughtful organization.
- Differentiating between main method and framework design is crucial.
- Centralizing configuration properties in a separate file simplifies maintenance.
55:05 💡 Implementing a “Highlight” feature in Selenium framework.
- Use a configuration property to control the highlighting behavior.
57:58 💡 Continuing test cases between different pages in a Selenium framework.
- When transitioning between pages, create methods that return the next page’s object.
- Avoid excessive use of the browser’s “Back” button, consider direct links or URLs.
01:17:14 💡 Managing XPath expressions in a Selenium framework.
- Storing XPaths in a properties file for easy maintenance.
- Using a logical naming convention for XPath properties.
This information provides insights into designing Selenium frameworks, adding features like element highlighting, and handling transitions between pages while maintaining XPath expressions efficiently.
01:17:42 🔑 Understanding the challenge of handling numerous XPaths in testing,
- Many XPaths are needed for different pages, which can result in excessive code.
- Discusses the approach of maintaining XPaths within the page to avoid redundancy.
01:18:09 🔑 Caution against using Page Factory and @FindBy annotations,
- Advises against using Page Factory and @FindBy annotations, as they may be deprecated in future releases.
- Recommends waiting for more sessions on page chaining models for better understanding.
01:19:26 🔑 Troubleshooting a code error due to incorrect method naming,
- Discusses how a code error arises due to incorrect method naming in a test.
- Highlights the importance of method dependencies and their correct configuration in the test framework.
00:00 🔍 Overview of previous progress and framework development.
- Reviewing the framework’s progress, test cases, and configurations.
- Emphasizing the need for a common place to implement a search method.
03:00 🔍 Implementing the search functionality on the Accounts Page.
- Creating a search method in the Accounts Page class.
- Dynamically generating a locator for the search field based on the search key.
- Handling scenarios when the search field is not available.
09:38 🔍 Clicking on a specific product on the Search Page and returning the Product Info Page.
- Creating a method to click on a specific product dynamically.
- Using dynamic locators for product selection.
- Returning the Product Info Page class.
14:04 🔍 Adding a method to verify the number of search results on the Search Page.
- Creating a method to count and verify the number of search results on the Search Page.
- Using dynamic CSS locators for identifying products.
- Handling scenarios where no products are found in the search.
24:14 🔍 Page Object Model (POM) and test design
- Discusses the organization of test cases and test classes in Page Object Model (POM).
26:18 📋 Combining test cases in POM
- Explains the concept of combining multiple test cases in the same test class within Page Object Model (POM).
32:13 🧩 Four-level page chaining pattern
- Demonstrates a four-level page chaining pattern in automated testing, from login to account, search, and product info pages.
48:03 📊 Implementing a data provider
- Introduces the concept of data providers and how to use them for supplying test data for different search keys.
52:39 💡 Understanding Test Data Providers
- Test data providers allow you to supply data for your test cases.
- Data providers help parameterize your tests and run them with different inputs.
53:15 🧪 Creating a Data-Driven Test
- Demonstrating how to create data-driven tests in Selenium.
- Using a data provider to iterate through test data and execute test cases with various inputs.
54:20 🗂 Managing Test Data in 2D Arrays
- Explaining the use of 2D arrays to manage test data efficiently.
- How to structure data for test cases with multiple rows and columns.
55:19 🔍 Accessing Test Data for Different Test Scenarios
- Utilizing data providers to handle different test scenarios with varied inputs.
- Storing data for multiple product search and verification cases.
56:20 📊 Data-Driven Testing for Scalability
- Discussing the advantages of data-driven testing for scalability and maintenance.
- Using a data-driven approach for efficient testing of various product categories.
58:03 📝 Considerations for Test Data Management
- Addressing the topic of managing test data effectively.
- Choosing between hard-coded data and external data sources for automation testing.
59:46 🔄 Delta Testing Approach
- Explaining the Delta testing approach to handle large amounts of data.
- Using a smaller, representative set of test data to ensure coverage.
01:19:08 📝 Test Assignment: Content Verification
- Assigning a task to check the presence of content on product pages.
- Emphasizing that content verification doesn’t include checking the content itself.
01:20:52 🛠 Proper Placement of Test Prerequisites
- Discussing the importance of placing test prerequisites correctly.
- Clarifying why data providers are not placed in the before class section.
00:01 💡 Framework Design and Test Cases
- Framework design discussion, creating page classes, and writing test cases.
01:30 💼 Levels of Page Chaining
- Explanation of different levels of page chaining in a test flow.
02:25 🛠️ Element Utility and Selenium Code
- Introduction to the Element Utility for Selenium code reusability.
03:30 📦 Data Providers and Test Cases
- Discussion of data providers and test cases for product information verification.
05:09 🖥️ Capturing Product Metadata
- Demonstrating how to capture and process metadata on a product info page.
07:00 📄 Splitting Text and Using HashMap
- Splitting text values and using a HashMap to store key-value pairs efficiently.
15:02 📊 Handling Pricing Information
- Discussing how to capture and process pricing information and store it in the HashMap.
24:12 🗝️ Custom Key for HashMap
- Creating custom keys for HashMap entries to efficiently manage and access data.
24:26 💡 Explanation of capturing product pricing information using WebDriver.
- Capturing prices using
- Storing prices and tax information in an array.
- Manipulating external text data to extract the desired value.
27:12 💡 Storing product name and additional data in a hashmap.
- Explaining how to add the product name to a product info map with a custom key.
29:15 💡 Dividing a long method into two for better readability.
- Splitting the method for fetching product metadata and pricing data.
- Improving code structure and maintainability.
34:25 💡 Writing a test method for validating product information.
- Initiating the test for a product using WebDriver.
- Leveraging soft assertions for multiple validations in a single test.
- Handling soft assertion to execute all validations and get detailed results.
46:09 💡 Explaining the difference between hard assertions and soft assertions in Selenium.
- Hard assertions terminate the test on the first failure.
- Soft assertions allow multiple validations before reporting results.
- When to use hard or soft assertions in test automation.
51:39 💡 Refactoring code to improve readability and maintainability.
- Moving print statements to relevant methods for cleaner code.
- Enhancing code structure and organization.
52:06 🧩 Understanding Hashmap in Java
- Hashmap is a non-order based collection in Java.
- Hashing concept calculates the hash code of the key and determines the index for storing data.
- Hash collision handling mechanism changed after JDK 1.8, converting lists into binary trees.
54:08 🗺️ Linked Hashmap for Maintaining Insertion Order
- Linked Hashmap is similar to Hashmap but maintains the order in which values are inserted.
- Demonstrates how to use Linked Hashmap to maintain order in data storage.
55:38 🌲 TreeMap for Sorted Order
- TreeMap is a special Hashmap that maintains sorting based on keys.
- Keys are sorted, with capital letters coming before small letters and numbers.
57:23 🧐 Practical Use of Maps in Selenium Framework
- Demonstrates how Hashmap, Linked Hashmap, and TreeMap can be used to store and validate information efficiently in a Selenium framework.
- Maps make it easy to validate data and provide a clear structure for information storage in testing.
58:35 🧰 Creating a Method to Enter Quantity and Add to Cart
- Explains creating a method, “enterQuantity,” for entering quantity and adding a product to the cart.
- Discusses using the method within a page class for maintaining a clear structure in automation testing.
01:10:15 🧪 Testing the Add to Cart Functionality
- Demonstrates how to create a test for the “add to cart” functionality.
- Uses a soft assertion to validate various aspects, including the success message and dynamic product names in the message.
01:17:54 🛠️ Handling Unwanted Characters in Success Message
- Discusses handling unwanted characters like ‘x’ in the success message by using the substring method.
- Demonstrates the importance of excluding unwanted characters in test automation.
01:18:25 💡 Discussing XPath and data manipulation in a test case.
- Explaining XPath usage in locating elements,
- Discussing data manipulation to extract specific information.
01:23:29 💡 String mutability and using StringBuilder.
- Discussing the mutability of strings,
- Introducing the usage of StringBuilder for string manipulation.
01:29:32 💡 Handling negative test scenarios and data providers.
- Suggesting a separate approach for negative test cases,
- Discussing the use of data providers for positive and negative scenarios.
01:34:18 💡 Framework design and upcoming topics.
- Mentioning the progress of framework design,
- Anticipating the coverage of topics like Jenkins and Docker.
01:42:30 💡 Addressing calculation issues in test cases.
- Explaining the need to calculate test data correctly,
- Highlighting the importance of consistent data for testing.
01:47:30 🧾 User discusses their progress with a test automation framework, specifically regarding login page negative tests.
- The user is seeking guidance on conducting negative tests on a registration page and handling error messages.
- They want to understand how to test negative scenarios when entering incorrect information in the registration form.
01:49:09 📝 The conversation shifts to discussing how to structure common elements in a test automation framework.
- The user is inquiring about managing common elements like log out buttons across multiple pages.
- They want to know whether they should maintain common elements in a separate “common” page or on individual pages.
01:56:17 🧩 User seeks guidance on structuring and reusing methods for common elements like page titles and URLs.
- The user wants to understand whether to use a common element utility class or directly call methods in test classes.
- They are looking for advice on how to handle common elements when navigating between multiple pages.
02:02:27 🚗 User asks about creating and managing objects when navigating between common pages.
- The user is concerned about creating multiple instances of a common page class in different test classes.
- They seek guidance on optimizing object creation and management when landing on common pages from various test cases.
02:04:20 📜 The user discusses warnings related to TestNG parameters and running tests from classes.
- The user faces warnings related to TestNG parameters when running tests directly from test classes.
- They need advice on resolving these warnings and running tests effectively.
02:07:45 🌐 The conversation shifts to handling browser opening and closing in a test framework.
- The user inquires about the best approach to open and close the browser when running multiple test cases in a single class.
- They seek guidance on optimizing browser management in the context of a test automation framework.
02:09:17 🔧 The user discusses using StringBuilder in test automation and suggests casting it to a string for assertion purposes.
- The user questions why StringBuilder is not cast to a string for assertion and suggests an alternative approach.
- They seek clarification on the use of StringBuilder and its implications in testing.
02:09:46 🚗 Thread Local and Driver Initialization
- Thread Local ensures each thread has its own copy of the driver.
- It doesn’t matter whether you write classes in the same test or multiple tests; each gets its copy.
- Thread Local is applied on the driver, not dependent on test organization.
02:12:23 📚 Understanding Thread Local
- Thread Local is applied to a variable of the generics provided (e.g., Webdriver).
- It’s useful for parallel test execution, giving each thread its local copy.
- TestNG doesn’t control thread local; it’s handled by the thread count you specify.
02:15:48 📝 Notes and Authenticity
- Notes are prepared by the instructor and not copied from the internet.
- Some diagrams might be sourced from Google Images.
- Ensuring authenticity and original content is a priority.
02:16:01 📄 Session Notes
- Notes are primarily created by the instructor.
- A previous contributor helped with animations and diagrams.
- Emphasis on delivering raw, original content.
02:16:28 👌 Conclusion and Acknowledgment
- It’s late, and the session will continue tomorrow.
- Gratitude for the clarification and originality of the content.
- Meeting scheduled for the next day.
00:01 📊 Explaining Data-Driven Approach with Excel
- Implementing data-driven testing with Excel sheets.
- Integrating data providers with Excel for supplying test data.
02:03 📄 Creating Excel Sheets for Test Data
- Creating Excel sheets to store test data.
- Adding data columns and sample entries in Excel.
08:24 🛠️ Using Apache POI API to Read Excel Data
- Setting up dependencies for Apache POI API.
- Initializing a workbook and sheet to access Excel data.
19:33 🔄 Iterating Through Excel Data
- Dynamically determining the number of rows and columns in the sheet.
- Initializing a 2D object array to store Excel data.
- Explaining the reason for using zero as the row index for column names.
22:50 🔗 Explanation of filling data from Excel sheet
- Explains how to fill data from an Excel sheet into a 2D array for automation testing.
28:44 🔗 Creating a generic method for Excel data retrieval
- Demonstrates the creation of a generic method for retrieving data from Excel sheets, making it suitable for various scenarios without hardcoding.
30:38 🔗 Creating a page class for user registration
- Initiates the creation of a page class for user registration, including locators for first name, last name, email, etc.
42:34 🔗 Registration success message handling
- Explains the handling of a registration success message, ensuring it’s displayed and validating its content.
45:00 🔗 Preparing for the next user registration
- Details the process of preparing for the registration of the next user, including logging out and returning to the registration page.
49:56 📝 Explanation of test case execution process.
- Explanation of how a test case goes through different pages, from login to registration.
52:00 🚦 Precondition for registration test cases.
- Discusses the need for a precondition to start test cases from the login page.
54:51 📊 Data provider for test cases.
- Implementation of a data provider to supply data from an Excel sheet to the test cases.
57:36 📃 Test case execution using data from Excel.
- Demonstrates running test cases using data from an Excel sheet and verifying success messages.
59:05 📈 Handling alignment of telephone numbers in Excel.
- Explains how to ensure correct alignment of numbers in Excel to avoid formatting issues.
01:06:40 📧 Generating random email addresses.
- Demonstrates a method to generate random email addresses for test data.
01:17:21 🤖 Discussing email generation methods
- Explained how to generate random email addresses for automation testing.
- Introduced the concept of using the current time in milliseconds to create unique email addresses.
- Showed how adding an identifier like “automation” to email addresses can aid in managing and deleting test data efficiently.
01:36:09 📚 Managing data for test cases
- Discussed the practice of using flags to determine which rows of data to execute.
- Highlighted the need for smart data management and avoiding unnecessary Excel sheets.
- Emphasized the importance of maintaining and organizing test data for efficient testing.
01:38:02 🔑 Handling login and test data
- Addressed the question of handling login scenarios in test cases.
- Emphasized the use of configuration files for storing login credentials.
- Mentioned the use of data providers for passing data, such as search terms, in test cases.
01:42:44 📊 Understanding Data-Driven Testing with Excel
- Data-driven testing involves using external data sources to supply test inputs and expected results.
01:43:13 🧩 Excel Sheet Configuration for Data Provider
- Setting up an Excel sheet as a data provider for data-driven testing.
01:44:00 🗂 Data Fetching from a Database
- To fetch data from a database, establish a database connection, use JDBC drivers, and execute SQL queries.
01:45:29 🧾 Handling Validation Messages in Automation
- Discussing how to handle validation messages generated by automation scripts.
01:57:22 🚀 Upcoming Weekend Class and GitHub Setup
- Announcing a weekend class and plans to set up GitHub for the group.
02:03:08 🧾 Handling Validation Messages in Automation (Continued)
- Continuing the discussion on handling validation messages and error messages in automation.
02:07:47 📦 Customized Automation Approaches in Different Teams
- Exploring variations in automation approaches, especially when Java developers are involved in automation projects.
02:08:12 🚧 Addressing Automation Complexity in Teams
- Discussing the issue of complexity in automation scripts and the challenges it can pose.
02:09:08 📉 Impact of Unnecessary Complexity on Team Productivity
- Exploring how unnecessary complexity in automation can hinder team productivity.
02:10:17 📊 Approaching Automation Improvement in Complex Projects
- Suggesting an approach to improve automation in complex projects by starting with a proof of concept (POC) to showcase benefits.
00:01 📋 Introduction to the need for Thread Local in Selenium
- The concept of Thread Local in Java for managing resources in multi-threaded environments.
- How using a shared driver instance can lead to potential issues in multi-threaded execution.
02:13 🔀 Implementing Thread Local for Selenium WebDriver
- Creating a thread local variable to manage the WebDriver instances.
- How to use the set() method to initialize the driver with thread local instances.
- The importance of synchronized keyword for managing thread safety.
07:05 🏁 Using the Thread Local Driver in TestNG Tests
- Creating a method to retrieve the local copy of the driver using the get() method.
- How to replace direct driver references with the getDriver() method.
- Ensuring thread safety and avoiding deadlock conditions.
12:18 🚀 Creating TestNG Runner for Parallel Execution
- Setting up a TestNG XML runner configuration for parallel execution.
- Defining test blocks and classes in the XML configuration for parallel test execution.
- Running multiple tests in parallel using TestNG’s parallel attribute.
15:05 📊 Viewing Default TestNG HTML Reports
- Overview of the default TestNG HTML report generated after test execution.
- The default report’s presentation of pass and fail results.
- Basic insights into test execution without custom reports.
19:29 📄 Exploring Extent and Allure Reports
- Introduction to custom reporting solutions like Extent and Allure reports.
- Understanding the benefits of using custom reports for detailed test reporting.
- Mentioning that these reports require the implementation of listeners.
23:22 📊 Understanding Test Reporting in Java
- Different test reporting tools can provide distinct looks and feels, but they often contain the same essential data.
- Extent Report and Allure Report are two popular reporting tools.
24:03 📝 Adding Extent Report Dependency
- To use the Extent Report, you need to add its dependency to your project’s POM (Project Object Model) XML file.
- Using a variable for the version can make it easier to manage dependencies.
26:07 📄 Creating an Extent Report Listener
- To use Extent Report, you’ll need to create a custom listener class that implements the TestNG
- The listener class will capture test information and integrate it with Extent Report.
34:16 📸 Capturing Screenshots for Test Failures
- To capture and attach screenshots for test failures, you can create a method to take screenshots.
- The method generates a file for the screenshot, moves it to a specified location, and then attaches it to the test report.
46:56 📸 Configuring Extent Report for capturing screenshots
- Learn how to configure Extent Report for capturing screenshots for skipped and failed test cases.
48:16 🧩 Customizing TestNG Listeners for reporting
- Customize TestNG listeners to control report generation for pass, fail, and skip test cases.
50:09 🧾 Adding Allure Report for enhanced reporting
- Integrate Allure Report into your test framework to generate detailed and customizable test reports.
51:06 🔄 Configuring TestNG XML with listeners for report generation
- Set up the TestNG XML file to include listeners for both Extent Report and Allure Report.
01:11:34 📊 Understanding the Impact of Test Listeners
- Test listeners can slow down test execution.
- Having many listeners can lead to pass-fail reports for each listener after every execution.
01:13:02 📈 Extent Report and Allure Report Generation
- Extent Report and Allure Report are discussed as reporting tools for test results.
- Allure Report is introduced as a web server-based report.
01:14:40 🚀 Installing and Running Allure Report Server
- Instructions for installing and running the Allure Report server on different platforms (macOS and Windows) are provided.
- Allure Report is described as a web server that generates dynamic reports from JSON files.
01:28:24 🌐 Accessing and Viewing Allure Reports
- Demonstrates accessing the Allure Report web server and viewing test execution reports.
- Discusses the advantages of Allure Report over static reports.
01:34:54 🔁 Refreshing the Allure Report Server for New Test Results
- Shows how to refresh the Allure Report server to view new test results.
- Emphasizes that the server needs to be restarted each time new test results are generated.
01:36:24 📊 Exploring Extent Report and its features
- Extent Report is a powerful framework for generating detailed reports for test execution.
- It offers category-wise reports and integrates well with JUnit and Gradle.
- Extent Report is lightweight and provides accurate results even with a high number of test cases.
01:38:13 🌐 Exploring Extent Report’s resources
- Extent Report’s official website is limited in terms of documentation and updates.
- You can find documentation and resources for Extent Report on GitHub.
- The project is open source and has contributions from well-known developers like Reindeer and ToolsQA.
01:42:10 💻 Troubleshooting issues with Extent Report setup
- Discussion about a potential holiday break from sessions on March 8.
- ThreadLocal driver setup helps prevent issues with parallel execution.
- A member’s question about when ThreadLocal driver is beneficial and how it differs from parallel execution.
01:53:00 🚧 Troubleshooting issues with PowerShell and Scoop
- Addressing issues with PowerShell and Scoop installation.
- Resolving errors related to execution policies and Scoop installation.
- Ensuring that PowerShell execution policies are appropriately set.
01:59:18 📂 Troubleshooting Excel data provider issues
- Discussing problems related to Excel data provider.
- Emphasizing the importance of sheet names in the Excel file.
- Highlighting issues with sheet names and constant values in code.
02:05:06 📝 Troubleshooting Excel data provider issues
- Discussion about column mismatch in Excel data.
- The importance of ensuring that the data provider’s attributes match the test script’s requirements.
- Emphasizing the need to avoid opening non-Java files within Eclipse and managing them from their physical location to prevent issues.
02:07:41 📂 Managing Excel data in Eclipse
- Highlighting the importance of handling Excel files from their physical location.
- Advising to avoid opening non-Java files within Eclipse to prevent unintentional changes.
- Demonstrating the process of deleting and saving data within the Excel file in its physical location.
00:00 📋 Introduction to Allure Reporting in Test Automation
- Understanding the purpose of Allure reporting.
- Overview of the video content and what to expect.
03:20 📊 Customizing Reports with Annotations
- Exploring annotations for enhancing Allure reports.
- Discussing annotations like @Epic, @Story, @Test, @Step, @Severity, @Description, and @Issue.
- Demonstrating how to use these annotations for detailed reporting.
17:21 🔁 Implementing Retry Logic with TestNG Listeners
- Introducing the concept of retry logic in test automation.
- Implementing retry logic with TestNG listeners using IAnnotationTransformer and IRetryAnalyzer interfaces.
- Setting a maximum number of retry attempts to handle test failures.
24:48 🔄 Implementing Retry Logic in Test Automation
- Implementing retry logic in test automation to handle test failures.
- Explaining the simple retry logic: If the test fails, increase the retry count, and mark the test as failed.
- Discussing the importance of defining a maximum retry count to avoid excessive reattempts.
27:34 📊 Handling Test Failures and Reporting
- Demonstrating how test failures and retries are displayed in reports.
- Explaining the behavior of TestNG reports when retries occur.
- Comparing the reporting in Extent Report and Allure Report and discussing their advantages and disadvantages.
36:36 🌐 Configuring Environment-Specific Executions
- Addressing the challenge of running test cases on different environments (e.g., QA, Dev, Stage, Production) using the same framework.
- Creating environment-specific configuration files (e.g., QA.config.properties, Dev.config.properties) for test data and settings.
- Explaining how to pass environment information as a command-line argument using Maven.
- Reading the environment variable and configuring the test framework accordingly.
47:10 🔄 Handling Environment Variables and Multi-Environment Projects
- Handling scenarios where no environment is specified by default to run tests on a predefined environment (e.g., QA).
- Using switch-case to configure the framework based on the specified environment.
- Converting environment names to lowercase for consistency.
- Preparing to read the corresponding configuration file based on the environment specified.
49:13 🚀 Maven and Environment Configuration
- Learn how to configure environments for your tests.
54:01 🖥 Running Maven Commands
- Understand how to run Maven commands from the command line.
58:42 🧪 Executing Test Cases
- Discover how to execute test cases on different environments using Maven and configuration files.
01:14:54 🧪 Exploring Multiple Environments
- Demonstrating how to work with different environments in a test framework.
- Using command-line arguments to specify environments.
- Handling incorrect environment parameters and custom exceptions.
01:19:09 📝 Handling Command-Line Parameters
- Discussing passing command-line parameters for test configuration.
- Using system properties for environment variables.
- Showing how to read these properties in code for configuration.
01:21:30 🚀 Implementing Custom Exceptions
- Creating and implementing custom exceptions in a test framework.
- Using a custom exception class to handle errors and provide meaningful messages.
- Demonstrating how to throw exceptions for specific conditions.
01:34:04 🖥️ Compiler and Java Version Compatibility
- Discussing the compatibility of Java versions with Selenium.
- Explaining the need to specify the source and target version in the Maven Compiler Plugin.
- Emphasizing the importance of matching the Java version used in the project with Selenium’s compatibility.
01:37:22 📦 Maven Source Compiler Plugin
- Mentioning how you can use Maven Compiler Plugin variables for source and target versions.
- Explaining how you can keep these variables in sync with the project’s Java version to maintain compatibility.
01:38:01 📄 Framework Diagram Resource
- Referring to a framework diagram available in the course materials.
- Noting that it’s located in the “Box videos” folder for reference.
- Suggesting to review the diagram to understand the framework structure better.
01:39:14 ❗️ Troubleshooting Null Pointer Exception
- Discussing a recurring issue with a null pointer exception.
- Advising to check the
ExcelUtilclass, especially line 30, for possible causes of the error.
- Requesting more details or code snippets to provide further assistance.
41 POM 9 – Repo Creation, First Commit and Git Add Init Commit Push Command
00:01 🛠️ Setting up File Util for Screenshot Management
- Replace file handler with file util in the code.
- File Util simplifies screenshot handling.
- Using File Util ensures proper report generation.
01:58 🌐 Setting Up GitHub Account and Creating a Repository
- Create a GitHub account for code storage.
- Having a GitHub account is crucial for code backup.
- You can create repositories on GitHub for your projects.
04:30 🧩 Understanding Git and GitHub
- Distinguish between Git and GitHub: Git is a tool, GitHub is a cloud service.
- Git is used for version control and code management.
- GitHub is a platform for hosting repositories and collaboration.
08:56 🔄 Basic Git Workflow
- The Git workflow involves three key commands: add, commit, and push.
- Add command stages changes in your local working copy.
- Commit records changes in your local repository.
- Push sends your changes to the remote repository on GitHub.
16:38 🏗️ Initializing a Git Repository
- Use the
git initcommand to initialize a project with Git.
- Initializing creates a hidden
.gitfolder in the project directory.
- It marks the project as a Git repository, allowing version control.
23:44 🚀 Explanation of Git ignore and its importance,
- Git ignore is used to specify which files and folders should be ignored when pushing code to a Git repository.
- It prevents unnecessary or sensitive files from being added to the repository.
27:27 🔗 Establishing a connection between local and remote repositories,
git remote addcommand is used to establish a connection between the local and remote repositories.
- It ensures that the local repository knows where to push code to on the remote repository.
31:09 💡 Understanding the concept of untracked files and the need to commit,
- Untracked files are files that have not been added or committed to the local repository.
- Committing files moves them to the staging area, making them ready for a commit.
37:32 🗝️ Generating a personal access token for authentication,
- Personal access tokens are used for authentication when pushing code to remote repositories.
- They provide secure access to your Git repositories without using your password.
43:47 🔄 Pushing code from local to remote repository,
git pushcommand is used to upload code from the local repository to the remote repository.
- It requires authentication with a personal access token for security.
46:19 🌐 Creating a new Git repository for a different project,
- Each project should have its own individual Git repository.
- Creating a new repository is essential before pushing code for a different project.
48:02 ✅ Summarizing the steps for pushing code to a new Git repository,
- The process involves creating a
.gitignorefile, initializing the repository, connecting to the remote repository, adding and committing the code, and finally pushing it to the remote repository.
- This process ensures that code is properly organized and secured in Git repositories.
48:16 🚀 Explaining how to push code to a Git repository.
- Detailed steps on pushing code to a Git repository.
51:13 🔄 Modifying code, committing, and pushing it to the remote repository.
- Demonstrating how to make changes in code, commit those changes, and push them to the remote repository.
54:22 📝 Deleting a file, committing, and pushing changes to the remote repository.
- Showing how to delete a file, commit the change, and push it to the remote repository.
01:14:23 💻 Setting up a public repository
- Creating a public repository on GitHub.
- Sharing the repository URL for others to access.
- Preparing for the initial Git commands.
01:15:05 📁 Initializing a Git repository
- Changing the directory to the project location.
- Initializing an empty Git repository using the
- Checking the status of untracked files.
01:17:10 🌐 Setting up a remote connection
- Adding a remote connection with the repository using
git remote add origincommand.
- Establishing the link between the local and remote repositories.
01:17:47 📝 Staging and committing changes
- Adding files to the staging area using
- Committing changes with a meaningful message using
- Addressing the initial author identity setup.
01:19:28 🚀 Pushing code to the repository
- Pushing code to the remote repository using
git push origin mastercommand.
- Addressing the need for authentication using a personal access token for the first time.
- Checking the changes on the remote repository.
01:21:49 🔄 Making subsequent changes and pushing
- Making additional changes in the code.
- Adding, committing, and pushing the updated code without repeated authentication.
- Demonstrating the ease of using Git commands compared to UI-based tools.
01:27:12 🌟 Benefits of using terminal and commands
- Highlighting the advantages of using the terminal and command-line Git operations.
- Building confidence in using Git commands for interviews and real-world projects.
- Faster and more efficient commit tasks with command-line operations.
01:28:36 🔍 Locating .gitignore file in Eclipse
- Explaining how to find the .gitignore file within an Eclipse project.
- Utilizing the “Ctrl+Shift+R” or “Command+Shift+R” shortcut to access hidden files.
- Understanding the importance of .gitignore in Git repositories.
01:30:00 📁 Naming consistency between local and remote repositories
- Clarifying that local and remote repository names can differ.
- Suggesting the benefit of using matching names to avoid confusion.
- Addressing potential questions about repository name matching.
01:30:25 📄 Creating a personal Git account
- Advising the creation of a separate personal Git account for non-work projects.
- Emphasizing the importance of separating personal and work-related accounts.
- Avoiding conflicts and restrictions with company Git repositories.
00:00 🚀 Introduction to Git and its key concepts
- Explanation of Git, PR process, merge conflicts, and branch creation.
- Demonstrating how to check the local commit history and push code to the remote repository.
07:15 📜 Viewing and filtering commit history with Git
- Explaining how to check commit history, including author names, dates, and commit messages.
- Demonstrating how to filter commits based on authors, dates, keywords, and specific files.
18:16 🌿 Working with branches in Git
- Discussing the concept of branches in Git.
- Illustrating how to create, switch, and work with branches in a collaborative project.
24:40 🚀 Working with Git Branches and Pull Requests
- When working with Git, developers create feature branches for new features or changes.
- Changes are committed and pushed to these feature branches.
- Before merging, a pull request (PR) is raised for code review and approval.
27:05 📝 Pull Request Process
- Pull Requests (PRs) are used for code review and approval.
- PRs are reviewed by team members, and they can approve or reject the changes.
- Approval is required before merging code to the master branch.
31:33 🔃 Keeping Branches Up to Date
- Developers need to regularly update their local branches with the latest changes from the master branch.
- Taking a pull ensures that all developers are working with the most up-to-date code.
- It prevents developers from falling behind the latest changes in the master branch.
43:02 🌐 Creating and Pushing a Feature Branch
- To work on a new feature, developers create a feature branch from the master branch.
- Code is developed, committed, and pushed to the feature branch.
- Pushing the code to the feature branch at the remote site also creates the branch on the remote repository.
49:30 🔀 Understanding the Base Branch
- The base branch is typically the stable branch, often referred to as the “Master” branch in Git.
51:10 📄 Creating a Pull Request and Providing Information
- When creating a pull request, you can add reviewers and assignees.
- It’s important to provide a meaningful summary and description of the changes made in the pull request.
51:40 🟢 The Status of a Pull Request
- The status of a pull request is initially “Open.”
- Reviewers receive notifications about the pull request.
52:37 🔍 Reviewing Code in a Pull Request
- Reviewers can add comments and feedback to specific lines of code in a pull request.
- Feedback helps improve the quality of the code.
54:34 📝 Approving or Requesting Changes
- Reviewers can either approve or request changes to a pull request.
- It’s essential to use clear and professional language in the comments.
58:48 🔄 Updating a Pull Request
- When changes are required, the developer can update the code in the same pull request.
- No need to create a new pull request; the existing one will be updated.
01:03:33 🗑️ Deleting Feature Branches
- After merging a feature branch, you can choose to delete it from the remote repository to keep it clean and efficient.
01:05:24 🔄 Best Practice for Keeping the Master Branch Updated
- Always take the latest pull from the master branch before creating a new feature branch to ensure you are working on the most current version of the code.
01:14:34 🔄 Collaboration with Multiple Developers
- When multiple developers are working on different features, it’s essential for each developer to follow the same branching and updating process to avoid conflicts and ensure a smooth collaboration.
01:14:47 🚀 Troubleshooting a scenario with local and remote branches.
- In this section, the presenter discusses resolving a scenario where local branches are out of sync with remote branches and how to update them.
01:15:58 🔄 Merging master code into a feature branch.
- The presenter explains the process of merging code from the master branch into a feature branch and why it’s a good practice.
01:19:31 🔀 Handling conflicts when working on the same feature in multiple branches.
- The presenter mentions that conflicts can occur when multiple developers work on the same feature in different branches and that resolving conflicts will be covered in the next session.
01:25:59 🗓️ Scheduling future sessions.
- The presenter discusses scheduling upcoming sessions to cover Jenkins, Docker, Nexus, and AWS topics.
01:37:06 🧩 Troubleshooting a test error in TestNG.
- The user encounters a TestNG error related to the package name and class name mismatch, and the presenter helps identify and fix the issue.
01:41:34 🩹 Correcting package and class name mismatches.
- The presenter guides the user in correcting package and class name mismatches in their project, resolving TestNG issues.
00:00 🧐 Introduction to code management in Git
- Git basics: code pushing, adding commits, raising PRs, and merging code.
- Importance of keeping the local and remote master branches in sync.
02:05 🔄 Completing the development cycle
- The importance of taking the latest pull from the remote Master to the local master.
- Avoiding direct merges from feature to master for safer code management.
06:46 🏷️ Tagging and releasing in Git
- Tagging commits for specific features or releases.
- Creating releases from tagged commits for version management.
21:15 👥 Checking contributors and code history
git shortlogto list contributors and their commit counts.
git blameto track code authorship and changes in specific files.
25:52 📚 Setting up a new team member
- When a new team member joins, they need to clone the project’s repository.
- The first step for the new member is to obtain the repository URL and clone the project.
28:12 🧹 The purpose of the .gitignore file
- The .gitignore file ensures that only relevant code and files are shared.
- It prevents unnecessary code and files from being shared with other developers.
29:12 🔗 Managing branches in Git
- New developers should work on their individual branches.
- Branches are used to separate features or bug fixes and maintain the codebase.
39:00 🔀 Merging specific commits with cherry-pick
- Cherry-pick allows you to select and merge specific commits from one branch to another.
- It is useful when you want to cherry-pick only certain changes from one branch to another, not the entire branch.
52:42 🔀 Resolving Git merge conflicts.
- Git merge conflicts occur when two developers make changes to the same part of a file.
- Conflict resolution involves manual intervention and communication between developers.
57:03 🔀 Conflict resolution through communication.
- Communication between developers is crucial in resolving merge conflicts.
- Conflicts should be resolved by discussing and deciding whose code to accept.
01:02:07 🔀 Deleting a specific local Git branch.
- You can delete a specific local Git branch using the “git branch -d” command followed by the branch name.
01:08:11 🔀 Reverting commits using “git reset.”
- “git reset” allows you to revert commits at different stages (soft, mixed, hard).
- “git reset –soft” removes the commit and keeps changes in the staging area.
- “git reset –mixed” removes the commit and unstages changes.
- “git reset –hard” removes the commit and all changes, use with caution.
01:19:47 🔀 Undoing commits with
git reset and
- Learn how to use
git resetto undo commits.
01:23:05 🔄 Pushing code and handling file deletion
- Understand how to handle pushed code and file deletions.
01:25:44 🌊 Hard reset and force push for remote changes
- Explore using
git reset --hardand
git push -ffor remote changes.
01:29:08 🛠 Managing access rights in Git for branches
- Learn how to manage access rights for Git branches.
01:31:35 🔗 Sharing and accessing Git code repositories
- Gain insights into sharing and accessing Git repositories.
01:40:25 🔄 Handling merge conflicts duringmultiple pulls
- Understand how to handle merge conflicts during multiple pulls.
01:44:11 🔄 Git pull vs. git fetch: Understanding the difference
- Differentiate between
git fetchin Git.
01:45:08 🔄 Troubleshooting Git Bash Issues
- Discussing issues with Git Bash not working.
- Suggesting to delete and re-download Git Bash.
- Mentioning the possibility of missingDLLs and the option to use the command prompt.
01:47:00 🔲 Using Git Commands in Windows Command Prompt
- Explaining that Git commands can be run in the standard Windows command prompt.
- Clarifying that Linux commands won’t work in the Windows command prompt.
01:47:41 🌐 Selenium and Chrome Version Compatibility Issue
- Addressing an issue with Chrome version 111 and Selenium causing exceptions.
- Recommending either downgrading Chrome or using a workaround with Chrome options.
- Providing an example of adding Chrome options to handle the issue.
01:53:06 🖥️ Adjusting Browser Zoom Level in Selenium
- Discussing how to handle situations where the browser zoom level is not ideal.
- Suggesting changing the browser window size using the
- Providing an example of changing the window size to address the zoom level issue.
00:01 🏗️ Setting Up Jenkins for Test Automation
- Jenkins is a critical tool for automation engineers to trigger and manage test cases.
- Jenkins takes the source code, typically from a Git repository, and runs test jobs on it.
- Jenkins can be configured to automatically run tests or triggered manually by teams.
04:02 📦 Downloading and Installing Jenkins
- To install Jenkins, you need to download the Jenkins War file.
- The War file, a web archive, is platform-independent and suitable for Windows, Mac, or Linux.
- After downloading, execute the War file using
java -jar jenkins.warto install Jenkins.
08:28 🧑💼 Setting Up the Jenkins Admin User
- After the initial Jenkins setup, create an admin user with a username, password, full name, and email.
- The admin user is required to manage Jenkins.
- Jenkins is accessible at
http://localhost:8080for local setups.
20:15 ☕ Java JDK Compatibility
- Jenkins no longer supports JDK 8; you must have at least JDK 11.
- Ensure JDK 11 is installed and set the
JAVA_HOMEenvironment variable to its path.
- This change is essential for running Jenkins successfully.
23:52 🏗️ Setting up Jenkins Global Tool Configuration
- Setting up Maven in Jenkins for the project.
- Configuring the JDK path (JDK 11) in Jenkins Global Tool Configuration.
- Explaining the process of downloading Maven and setting it up.
25:01 📦 Downloading Necessary Jenkins Plugins
- Installing the TestNG plugin in Jenkins for publishing TestNG reports.
- Installing the Maven integration plugin for Maven-based projects.
- Installing the HTML publisher plugin for publishing HTML reports.
28:22 🛠️ Configuring Jenkins Job for Test Automation
- Creating a new Jenkins job for test automation.
- Configuring the job with the project’s Git repository URL.
- Setting up the branch from which to trigger the test cases.
- Configuring the location of the Maven POM (form XML) file.
- Specifying Maven goals for the build process.
36:58 🔄 Adding Leo Report Configuration
- Setting up the LIR (Leo Report) plugin in Jenkins.
- Configuring the earlier report to generate test execution reports.
- Specifying the directory and file for generating the LIR report.
43:06 📁 Updating Code and Configurations
- Deleting unnecessary code files from the project.
- Updating the Chrome 11 configuration in the driver factory class.
- Pushing the code changes to the Git repository.
- Running the Jenkins job to trigger test automation.
46:38 🏁 Successful Execution and Unstable Build
- Observing the test execution in Jenkins.
- Analyzing the test results and logs.
- Identifying unstable builds due to test failures.
- These sections provide a detailed breakdown of the video’s content, covering Jenkins setup, plugin installation, job configuration, code updates, and test execution.
48:48 📊 Overview of Test Reports
- Understanding the Jenkins test report overview.
- Accessing package-wise reports, test details, and screenshots.
- Navigating between different reports and Jenkins server URL.
51:21 🚫 Troubleshooting Broken Reports
- Identifying issues with static web HTML reports.
- Addressing broken images and CSS problems.
- Workaround using a Chrome extension for Content Security Policy (CSP).
55:27 🛠️ Parameterizing Environment and Browser
- Parameterizing test execution with environment variables.
- Using the Choice Parameter plugin to select the test environment.
- Dynamically specifying the browser to run the tests.
01:12:08 ⏰ Scheduling Test Execution
- Exploring Cron job expressions for scheduling.
- Configuring Jenkins to run tests periodically.
- Understanding how to set up a recurring test execution.
01:14:07 🕒 Understanding job scheduling in Jenkins.
- Jenkins allows you to schedule jobs for automated execution.
- You can set the timing for job execution, even with options like daily, nightly, and more.
01:14:52 ⏰ Configuring job schedules.
- You can specify the exact time and frequency for your job to run, whether it’s in the morning or evening.
- Jenkins provides flexibility in scheduling based on your requirements.
01:16:12 🔄 Automating test execution at regular intervals.
- Jenkins allows you to set up recurring test runs at specified intervals, which is useful for continuous testing.
- You can run test cases automatically every 5 minutes or at custom intervals.
01:19:10 🧪 Running test cases in different environments.
- You can configure Jenkins to run your test cases in multiple environments, ensuring thorough testing.
- This helps ensure compatibility across various environments and configurations.
01:23:23 🛠️ Simplifying the setup of Jenkins.
- Setting up Jenkins involves configuration, plugin installations, and defining jobs but is a one-time activity.
- Jenkins acts as a virtual member of your team, managing the workspace and test execution.
01:29:32 🌐 Configuring Jenkins for multi-branch testing.
- You can set up different jobs for different branches, such as a development branch and a more stable master branch.
- This approach allows you to control the execution environment for each branch.
01:35:04 🚀 Leveraging Docker for parallel test execution.
- Using Docker containers, you can create separate execution environments for parallel test runs, eliminating conflicts.
- Docker ensures test isolation and efficient parallel testing.
01:36:43 📋 Configuring multiple test execution XML files.
- You can configure Jenkins to run different sets of test cases by specifying multiple XML files.
- This flexibility allows you to run specific test suites like regression or sanity tests.
01:37:17 🏢 Choosing the environment for Jenkins.
- Whether to run Jenkins on a physical or virtual machine depends on your organization’s budget and requirements.
- Companies often use dedicated servers or cloud-based solutions for Jenkins hosting.
01:37:12 💡 Setting up Jenkins in service-based vs. product-based companies
- Jenkins setup in service-based vs. product-based companies.
- Differences between virtual and physical machines for Jenkins setup.
- Limited freedom to install Jenkins from scratch in companies.
01:40:22 💼 Updating Java for Jenkins 11
- Updating Java version for Jenkins 11.
- Updating the JDK and environment variables for Jenkins.
- Resolving Java-related issues when running Jenkins.
01:42:03 🐛 Troubleshooting Git reset issues
- Troubleshooting issues with Git reset.
- Resolving problems when using “soft reset,” “mixed reset,” and “hard reset” in Git.
- Proper steps for undoing commits in Git.
01:51:02 🛠 Updating project information in STS
- Updating project information in Spring Tool Suite (STS).
- Modifying project details such as Group ID and Artifact ID.
- Ensuring consistency in project configuration.
01:52:25 🔒 Handling client requests for security testing
- Dealing with client requests for security testing.
- Discussing client requirements related to security issues.
- Exploring alternatives and addressing security concerns.
01:54:19 📝 Managing test data and file updates
- Managing test data and updating files.
- Handling the need to write and update data based on test conditions.
- Considerations for storing and updating test output data.
00:00 🛠️ Jenkins Shutdown Explanation
- Jenkins shuts down when the command prompt is closed.
01:14 🔄 Restarting Jenkins
- How to restart Jenkins with a specific port, preventing a new installation.
03:32 🌐 Setting Up NGrok Proxy
- Explanation of using NGrok proxy to trigger Jenkins jobs automatically when code is pushed to a repository.
06:13 🔐 Registering and Authenticating NGrok Proxy
- Steps to register and authenticate NGrok proxy with an authentication token.
11:03 🚀 Starting NGrok Proxy
- Starting the NGrok proxy to forward traffic to Jenkins.
16:17 🕵️ Creating GitHub Webhook
- Setting up a GitHub webhook to trigger Jenkins using NGrok proxy.
19:26 🧩 Triggering Jenkins Job via Webhook
- Demonstrating how changes pushed to a GitHub repository trigger a Jenkins job through the NGrok proxy.
21:51 🧬 Understanding Jenkins Environments
- Clarification that Jenkins jobs triggered via webhooks run in a specific environment and cannot be parameterized.
24:32 🔧 Understanding Jenkins Pipeline Basics
- Jenkins pipelines are a crucial part of the CI/CD process.
- The pipeline represents a series of stages, each with its own purpose, from building to deploying.
26:09 🚀 What is a CI/CD Pipeline?
- A CI/CD pipeline is a complete deployment or release lifecycle.
- It consists of a sequence of jobs that are triggered one after another, ensuring efficient software development and delivery.
29:51 💼 Achieving 100% CI/CD
- Achieving 100% CI/CD, where everything is automated without any manual intervention, is very challenging.
- Some companies claim to achieve it, but it’s rare and often not practical in complex projects.
42:23 🛠️ Writing a Jenkins Pipeline Script
- In Jenkins, you can create a pipeline script to define your CI/CD process.
- The script includes stages for building, deploying, running tests, and deploying to various environments.
48:19 🏗️ Pipeline Execution Overview
- Demonstrates how to trigger a Jenkins pipeline and provides an overview of the execution stages.
50:03 📜 Jenkins Declarative Pipeline Syntax
- Explains the concept of Jenkins Declarative Pipeline Syntax and its importance in creating pipelines.
51:57 📁 Maintaining Jenkins Pipeline Scripts in Source Code
- Demonstrates how to store Jenkins pipeline scripts in source code for better version control and management.
54:13 🔄 Configuring Jenkins to Use Jenkinsfile from Source Code
- Shows how to configure Jenkins to use a Jenkinsfile from source code for pipeline execution.
56:21 🌊 Blue Ocean Pipeline for Visualization
- Introduces the Blue Ocean plugin for Jenkins, enhancing the visualization of pipelines.
59:55 📦 Installing the Blue Ocean Pipeline Plugin
- Provides steps to install the Blue Ocean pipeline plugin for improved pipeline visualization.
01:09:05 📄 Parameterizing Test Suite Selection
- Demonstrates how to parameterize the selection of test suites in Jenkins for better flexibility in test execution.
01:13:46 🏗️ Explanation of Jenkins pipeline stages and project involvement,
- Overview of Jenkins pipeline stages and project involvement.
01:15:09 🔄 Adding separate repositories for automation,
- Why separate repositories are used for automation projects in Git.
01:16:09 📦 Maintaining automation test cases in separate repositories,
- The rationale for maintaining automation test cases in separate Git repositories.
01:17:18 🔄 Controlling where code is read from in the pipeline,
- How to control the source of code for different stages of the pipeline.
01:19:24 🔀 Pushing code changes to the Git repository,
- Steps to push code changes to the Gitrepository in the Jenkins pipeline.
01:21:05 🕘 Executing automation tests and generating reports,
- Running automation tests and generating reports in the Jenkins pipeline.
01:25:17 🧪 Viewing Jenkins pipeline execution logs and reports,
- How to view the execution logs and generated reports in the Jenkins pipeline.
01:29:44 🔗 Navigating between classic and Blue Ocean pipeline views,
- Switching between classic and Blue Ocean pipeline views in Jenkins.
01:36:13 🔄 Extending the pipeline for API testing,
- How to extend the Jenkins pipeline to include API testing stages.
01:40:23 🚧 Understanding the concept of building in software development,
- Explanation of the concept of “building” in software development.
01:41:02 🏗️ Understanding the concept of “build” in CI/CD
- Build in a CI/CD pipeline means continuously creating an executable form of the code.
- The type of file created depends on the technology being used, such as Jar for Java or War for web applications.
- Creating a build is essential before deploying code to environments like Dev, QA, or production.
01:43:33 🛠️ Maven as a build automation tool
- Maven is a build automation tool used to create executable builds like Jar files.
- It converts source code into an artifact that can be deployed.
- Deploying a build is essential for running applications on specific servers and environments.
01:45:47 🖥️ Understanding servers and virtual machines
- Servers, like Tomcat, are applications that run on virtual machines (VMs).
- VMs are the machines where server applications and builds are deployed.
- VMs can be physical hardware or virtual machines on the cloud.
01:46:30 🌐 Setting up environments and web servers
- Different environments (Dev, QA, Production) require separate web servers (e.g., Tomcat).
- Each environment has its own VM and Tomcat server for deploying and running applications.
- Maintaining separate VMs and web servers is necessary for different stages of the pipeline.
00:00 📚 Introduction to Selenium Grid
- Selenium Grid allows running test cases on multiple platforms in parallel.
- It supports cross-browser testing and can be hosted on local machines, cloud, or VMs.
03:14 🖥️ Setting Up Selenium Grid with VMs
- Explains the traditional approach using virtual machines (VMs) to set up a Selenium Grid.
- Discusses the challenges of cost, scalability, and maintenance with VM-based Selenium Grid.
21:48 🐳 Docker as a Modern Selenium Grid Solution
- Introduces Docker as a modern solution for setting up Selenium Grid.
- Docker allows multiple containers on a single machine, offering cost-efficiency and scalability.
- Simplifies Selenium Grid setup, eliminating the need for VMs and their associated challenges.
22:56 🐳 Docker Hub and Docker Images
- Docker Hub is like a Maven repository for Docker images.
- Docker provides images for various software, making it easy to download and run them on your system.
24:07 📦 Creating Containers from Images
- In Docker, you first download images from Docker Hub, then create containers from these images.
- Containers are lightweight virtual machines that run specific applications with their own minimal operating systems.
26:06 🔁 Scaling Containers and Image Variants
- You can create multiple containers from a single image, enabling parallel execution of tests or applications.
- Docker allows you to manage different versions of images for the same application, making it versatile.
30:45 🌐 Dockerized Grid for Parallel Testing
- Dockerized grids enable parallel test execution across various browsers and versions.
- It’s cost-effective, lightweight, and allows easy scaling up or down based on your requirements.
34:41 📜 Limitations of Dockerized Grid
- Dockerized grids are primarily based on Linux, limiting the types of operating systems for testing.
- Limited to supporting Chrome, Firefox, and Edge browsers, and not other browsers like Safari or Internet Explorer.
45:19 ☁️ Cloud-Based Docker Grid
- You can set up a Docker grid on cloud services like AWS to have a separate execution environment for running test cases on various browsers.
- Jenkins or other CI/CD tools can trigger test execution on the cloud-based Docker grid.
46:01 🛠️ Future Topics
- Exploring custom grids like Selenoid grid.
- Creating a browser lab with Docker images.
- Learning about Docker Compose and important Docker commands.
47:12 🐳 Introduction to Docker Requirements
- To run Docker properly, you need at least 8 GB of RAM, as it operates alongside other software like Jenkins and Selenium.
- Ensure your system meets the RAM requirements for a smooth experience.
48:07 📥 Installing Docker on Windows
- Installing Docker on Windows is straightforward, and it provides a .exe file of around 625 MB.
- No complex configuration or environment variables are needed; it’s a hassle-free installation process.
49:38 🖥️ Getting Started with Docker
- After installing Docker, you can access the Docker desktop, which is represented by a blue whale icon.
- The desktop provides information about images and containers, making it easy to manage Docker resources.
51:24 🔄 Managing Docker Images and Containers
- Docker allows you to manage images and containers, which are essential for creating and running applications.
- You need to pull images from Docker Hub to use them as a base for creating containers.
- Running a container without an associated image is not possible; images are fetched from repositories.
56:11 🏃♀️ Using Docker Run Command
- The Docker
runcommand is used to create and start containers from images.
- If the required image is not available locally, the
runcommand will pull it before creating the container.
- You can create multiple containers from the same image using the
58:39 🗑️ Managing Containers
- Docker allows you to manage containers, and you can use commands like
docker ps -ato see all containers, whether running or not.
- Containers can be given names for easier identification, and you can remove containers when they are no longer needed.
00:00 🚀 Introduction to Docker and Selenium Grid
- Introduction to using Docker for Selenium Grid setup.
03:39 🐳 Setting Up Selenium Grid with Docker
- Explaining the process of setting up Selenium Grid using Docker.
- Mentioning the need to pull Docker images for Selenium Grid components.
06:21 📦 Selenium Grid Docker Compose Files
- Introducing Docker Compose files for Selenium Grid setup.
- Explaining how to specify services and dependencies in the Docker Compose file.
13:55 📄 Creating a Docker Compose YAML File
- Creating a Docker Compose YAML file for Selenium Grid.
- Explaining the format, services, and dependencies within the YAML file.
19:53 ⌨️ Running Docker Compose
- Demonstrating how to run Docker Compose to set up Selenium Grid containers.
- Discussing the detached mode (-d) for running in the background.
23:58 🚀 Configuring Selenium Grid for Remote Webdriver
- Configuring Selenium Grid for remote WebDriver.
- Modifying the driver initialization for remote execution.
26:32 🖥️ Modifying Test Configuration for Remote Execution
- Modifying the test configuration for remote execution.
- Reading properties for remote execution from configuration files.
34:20 🌐 Selenium Grid Infrastructure Setup
- Setting up Selenium Grid infrastructure.
- Overview of the Selenium Grid dashboard and its nodes.
46:35 🧰 Improving Code Readability
- Improving code readability by refactoring using switch-case statements.
- Enhancing maintainability and reducing redundancy in the code.
50:40 💡 Configuring remote and local execution for different browsers
- Set the
truefor remote execution and
falsefor local execution.
- Supplying browser parameters for different test scenarios.
51:43 💡 Supplying test parameters from testng.xml
- Setting up test parameters for different test cases.
- Using the
@Parametersannotation in TestNG.
53:56 💡 Updating browser properties dynamically
- Dynamically updating browser properties in the configuration file.
prop.setPropertyto modify properties at runtime.
57:05 💡 Initializing driver with updated properties
- Updating the browser property at runtime and initializing the driver with the updated property.
- Ensuring that the test cases run with the specified browser configuration.
59:54 💡 Running parallel tests on a Selenium Grid
- Scaling the number of browser instances dynamically using Docker Compose.
- Demonstrating the ability to run parallel tests on a Selenium Grid with multiple browser configurations.
01:13:31 💡 Scaling up and down browser instances with Docker Compose
- Demonstrating the ability to scale up or down the number of browser instances with Docker Compose.
- Highlighting the flexibility of Docker for managing containerized test environments.
01:16:24 🔍 Overview of Selenium Grid and Docker Setup
- Selenium Grid in the context of Docker.
- Setting up containers for cross-browser testing.
01:19:11 🔧 Configuration and Hub Server
- Explanation of the Hub server and its purpose.
- How to set up the Hub server and connect nodes to it.
- Different ways to specify the Hub URL (local, specific machine, or cloud).
01:24:49 📊 Connecting Jenkins to Selenium Grid
- Setting up Selenium Grid for Jenkins integration.
- Configuring Jenkins to run tests on the Grid.
- Ensuring that the Jenkins machine doesn’t launch browsers unnecessarily.
01:26:13 🧰 Advanced Grid Concepts
Exploring advanced topics such as custom grids and multi-browser versions.
Overview of the flexibility offered by Selenium Grid and Docker in test automation.
01:31:11 🐋 Docker Compose and Running Containers
- Explanation of Docker Compose’s role in running containers.
- Understanding how Docker Compose reads the YAML file and creates containers based on the configuration.
- Benefits of dynamic configuration for test automation.
01:37:05 💻 Running Cross-Browser Tests
- How to set up cross-browser tests by configuring test parameters in TestNG.
- Ensuring that tests run on the desired browser containers.
- Achieving flexibility in test execution based on browser configurations.
01:39:41 🚀 Scaling Docker Containers
- Scaling Docker containers up or down based on your testing requirements.
- Demonstrating how containers are dynamically allocated to test cases.
- Highlighting the ability to manage container availability for parallel test execution.
01:40:31 💡 Understanding Selenium Grid Execution Flow,
- Explains the flow of Selenium Grid execution when multiple tests are run.
- Discusses how threads are allocated to containers and their execution sequence.
01:42:09 💡 Manual Container Scaling vs. On-Demand Container Creation,
- Compares manual container scaling with on-demand container creation.
- Highlights the advantages of on-demand container creation for Selenium Grid.
01:45:19 💡 Scaling Up Containers on the Fly,
- Discusses the ability to scale up containers in real-time without interrupting executions.
- Emphasizes the advantages of maintaining advanced containers for efficient scaling.
01:47:50 💡 Sharing Execution Videos,
- Touches on the option to share the execution results through a grid URL.
- Hints at the possibility of recording and downloading video executions for further sharing.
00:01 🚀 Introduction to selenoid and its advantages,
- Learn about selenoid, a custom Selenium Grid.
- Understand the benefits of selenoid, including cost-effectiveness and ease of setup.
03:30 🖥️ Setting up a custom selenium grid with selenoid,
- Discover the basic architecture of selenoid and how it differs from a typical Selenium Grid.
- Learn how to create a Docker Compose file to specify the services you want (Chrome, Firefox, selenoid grid, and UI).
- Understand the purpose of the browser.json file, which specifies the browser versions you want to use.
16:17 📂 Creating the necessary configuration files,
- Overview of the Docker Compose file (docker-compose.yml) with service definitions for selenoid and UI.
- Explanation of the browser.json file, where you specify the browser versions you want to use.
- Ensuring the alignment of services in the Docker Compose file for proper configuration.
22:29 🔄 Modifying the configuration for additional browsers,
- Demonstrating how to add more browser versions to the Docker Compose file.
- Showing the flexibility of updating the browser.json file to match your desired browser configurations.
- Emphasizing that you can easily adapt the setup to your specific needs.
23:23 🐳 Understanding Docker Network in Selenoid
- Docker containers need to communicate, and Selenoid uses a network for this purpose.
- Selenoid creates a common network for its containers to facilitate communication.
25:30 🧹 Cleaning Up Existing Docker Containers and Images
- To prevent conflicts, it’s advisable to remove existing Docker containers and images.
docker system prune -acommand efficiently removes all containers and images not in use.
40:07 💻 Accessing Selenoid Dashboard and Running Manual Tests
- You can access the Selenoid dashboard via localhost:4444 and see the available browser versions.
- Selenoid allows manual testing by creating sessions for specific browser versions, making it versatile for both manual and automated testing.
46:20 🤖 Running Automated Tests on Selenoid
- Automated tests can be executed on Selenoid by configuring the test environment to connect to the Selenoid server on port 4444.
- Selenoid handles the execution of test cases on different browser versions specified in your test configuration.
47:54 🚀 Selenoid Docker Grid Execution
- Demonstrates how to run test cases using Selenoid and Docker containers.
48:36 🆓 Benefits of Using Selenoid
- Selenoid allows visualizing and managing test cases efficiently.
- Configuring remote WebDriver for running tests on Selenoid is straightforward and cost-effective.
49:02 🌐 Running Tests on AWS with Selenoid
- Setting up and distributing Selenoid on AWS for organization-wide test execution.
- Centralized test management with AWS providing public access.
50:34 🤖 Naming Test Cases for Differentiation
- Demonstrates how to assign test case names to differentiate tests running on different browsers.
- Helps identify which tests are running on which browser version.
52:44 🚨 Importance of Running Tests on a Separate Execution Environment
- Emphasizes the need to avoid running tests on Jenkins machines.
- Explains the importance of using a dedicated execution environment.
58:22 💻 Changing Jenkins Port to Avoid Conflict
- Demonstrates how to change the port number of Jenkins to avoid conflicts.
- Runs Jenkins on port 1990 to free up port 8080 for Selenoid.
01:08:39 📦 Triggering Jenkins Build with Updated Code
- Triggers a Jenkins build with the updated code.
- Discusses the importance of aligning the Jenkins job configuration with the code updates.
01:14:08 📊 Jenkins Running Test Cases on Docker Containers
- Confirms that Jenkins runs test cases on Docker containers successfully.
- Highlights that Jenkins does not interfere with the test execution process.
01:15:35 📊 Understanding Test Reports
- Explains analyzing test reports, specifically focusing on Jenkins and TestNG reports.
- Mentions that test cases are working fine, discussing the importance of reports.
01:16:50 🤖 Preparing to Trigger Test Cases
- Discusses preparing to trigger test cases through Jenkins and NG proxy.
- Emphasizes the importance of automation knowledge for interviews and justifying your experience.
01:17:50 🚀 Interview Preparation Tips
- Provides tips for interview preparation, especially for automation-related roles.
- Suggests setting up your own system with Jenkins, Docker, and repositories for live demonstrations.
01:21:50 📚 Documenting Your Automation Process
- Discusses the importance of explaining your automation process during interviews.
- Highlights the significance of showcasing practical knowledge and setting up infrastructure in advance.
01:23:30 🏆 Impressing Interviewers
- Advises impressing interviewers by demonstrating your infrastructure setup and explaining it confidently.
- Mentions that interviewers are interested in practical knowledge and problem-solving.
01:28:40 🛠️ Demonstrating Docker Setup
- Recommends demonstrating Docker setup for interviewers.
- Highlights the benefits of quickly showing your environment’s setup and usage.
01:31:02 📃 Resume and Interview Prep
- Discusses the importance of resume preparation and the significance of showcasing practical skills during interviews.
- Mentions sharing example resumes and offering guidance for creating a standout resume.
01:35:44 💬 Wrapping Up and Building Confidence
- Reflects on the confidence gained from the training and the ability to explain concepts during interviews.
- Promises a future session on interview preparation and tips for presenting your experience effectively.
These sections provide insights into understanding test reports, interview preparation, infrastructure setup, and tips for impressing interviewers in the context of automation and related topics.
01:36:43 💡 Preparing for Interviews and Showcasing Experience
- Discussing the importance of showcasing experience in automation.
01:37:12 💼 Experience in Automation and Technology Matters
- Highlighting the significance of technology knowledge in automation and how it impacts your experience.
01:38:05 🏗️ Designing Automation Framework from Scratch
- Emphasizing the ability to design an automation framework from scratch as a demonstration of expertise.
01:40:17 💰 Waiting for the Right Offer and Market Conditions
- Advising patience in waiting for the right job offer and considering market conditions.
01:41:46 🔄 Learning to Switch Career to Automation
- Providing guidance on transitioning to a career in automation and the importance of continuous learning.
01:42:01 📚 Focus on Java and Essential Automation Skills
- Recommending a focus on Java and essential automation skills like Postman and REST Assured.
01:43:09 🔧 Additional Skills for Strengthening Your Profile
- Suggesting the addition of API skills and some knowledge of Cucumber and BDD frameworks.
01:43:49 🧩 Mastering the Basics and Avoiding Overwhelm
- Emphasizing the importance of mastering the basics, such as Java, before diving into multiple tools and technologies.
00:02 🌐 Setting Up AWS for Running Test Cases on Cloud
- Understand the need for running test cases on AWS.
- Overview of AWS data centers and regions.
- Selecting an AWS region for your virtual machine.
03:15 🔒 Configuring an AWS EC2 Instance for Testing
- Selecting an Amazon Machine Image (AMI) for your EC2 instance.
- Choosing the right machine type for test case execution.
- Creating a key pair for secure remote access to the EC2 instance.
21:29 🛡️ Adding Security Group Rules for SSH Access
- Understanding the purpose of SSH for remote login.
- Configuring security group rules for SSH access to the EC2 instance.
- Preparing the environment for secure remote connection.
22:21 🖥️ Setting up Security Groups in AWS
- Security Groups in AWS are used to control inbound and outbound traffic for your instances.
- You can specify rules to allow or deny traffic to specific ports and sources.
25:38 📊 Configuring the AWS Instance
- The video goes through configuring an AWS EC2 instance, setting storage capacity to 32GB, and other settings.
- These configurations are essential for creating a virtual machine that suits your needs.
31:45 🌐 SSH Login to AWS EC2 Instance
- Demonstrates how to SSH into your AWS EC2 instance using a PEM key.
- Shows the steps for giving permissions to the PEM key if you’re on a Mac.
42:02 ☕ Installing Java and Docker on AWS EC2
- Covers how to install Java and Docker on an AWS EC2 instance.
- Also includes checking the versions of these tools to ensure they are correctly installed.
47:17 🧐 Explaining how to copy and paste files using vi (text editor) in AWS.
- Copying and pasting files in vi on AWS using the insert mode.
- Exiting insert mode in vi using the Escape key.
- Saving and exiting a file in vi using the “:wq” command.
48:30 📂 Setting up a network in AWS using Docker.
- Creating a network in AWS with the command “docker network create.”
- Dealing with permission issues using “sudo” when creating a network.
- Starting Docker containers with the command “sudo docker-compose up -d” in AWS.
51:12 💻 Demonstrating Docker image download and container creation.
- The process of downloading Docker images and creating containers.
- The efficiency of AWS internet speed in fetching Docker images.
- Monitoring the progress of image downloading and container creation.
52:30 🖥️ Checking the status of Docker containers and images in AWS.
- Using the command “sudo docker ps -a” to view all running containers.
- Verifying the presence of Docker images with the command “docker images.”
- Exploring the availability of images and containers on the AWS server.
55:06 🌐 Accessing the AWS infrastructure via a public IP address.
- Obtaining the public IP address of the AWS server.
- Accessing the solenoid Hub and the solenoid UI via the public IP.
- Providing remote access for others to utilize the AWS infrastructure.
01:17:22 🌐 Configuring Hub URL and Docker Compose
- Setting up Hub URL for Selenium Grid.
- Troubleshooting issues with the Hub URL.
01:19:57 ⚙️ Jenkins Configuration and AWS Termination
- Configuring Jenkins to work with the NGROK proxy.
- Discussing the importance of terminating AWS instances after use.
01:25:35 🛠️ Practical Tips for AWS and Jenkins
- Explaining the concept of Docker Networks in the context of Selenium Grid.
- Clarifying the need for the NGROK port to match Jenkins.
- Mentioning the option to record videos in Solenoid and how to access them.
01:34:13 💼 Responsibility for Terminating AWS Instances
- Discussing the responsibility for terminating AWS instances in a real-time organization.
00:00 🚀 Introduction and Selenium Update
- Explanation of Selenium version 482 availability and issue fixes.
- Demonstrating the upgrade process for Selenium 482.
01:10 📦 Introduction to Nexus and Maven Life Cycle
- Introducing the concept of Nexus as an artifact repository manager.
- Explaining the benefits of creating fat jars for common automation frameworks.
- Discussing how different teams can use a common automation framework and maintain their own page and test classes.
15:50 🔗 Advantages of Common Automation Framework
- Highlighting the advantages of a common automation framework, including consistency, resource management, and return on investment.
- Emphasizing the importance of maintaining a centralized repository of common automation frameworks.
- Discussing the potential learning curve and career prospects in a Center of Excellence (CoE) team vs. project-specific teams in the context of automation.
24:08 💡 Creating a common automation framework for multiple teams in a company.
- Proposing a common automation framework for efficient resource management.
- Encouraging consistency in tool usage across teams.
26:27 💡 Understanding Maven plugins for creating and deploying JAR files.
- Explaining the use of Maven plugins like the jar plugin and assembly plugin.
- Highlighting the role of the Maven deployment plugin in publishing JAR files to a repository.
29:32 💡 Installing Nexus repository manager using Docker.
- Demonstrating how to pull and run the Nexus repository manager image with Docker.
- Troubleshooting when the Nexus server is not immediately accessible.
58:25 🚀 Deploying to Nexus Repository
- Configuring distribution management for Nexus deployment.
- Setting up the Nexus URL and authentication.
- Using the Maven assembly plugin to create a JAR file.
01:00:07 🛠️ Building and Deploying the JAR
- Running Maven packaging to generate the JAR.
- Skipping test execution to speed up the process.
- Deploying the JAR to the Nexus repository.
01:05:24 📦 Nexus Repository Usage
- Retrieving dependencies from the Nexus repository.
- Integrating external projects with your Nexus-hosted artifacts.
- Managing versions and dependencies using Nexus.
01:10:52 📚 Reusing the Framework in Other Projects
- Adding the framework’s JAR as a dependency in a new project.
- Using classes and methods from the framework in the new project.
- Demonstrating the power of a shared framework for multiple teams.
01:15:53 🧩 Leveraging Shared Frameworks
- Emphasizing the benefits of a shared automation framework.
- Highlighting the role of an architect in defining best practices.
- Promoting reusability and collaboration among development teams.
00:01 🛠️ Setting up Log4j for Logging in a Maven Project
- Configuring Log4j for logging in a Maven project.
- Adding Log4j dependencies and creating a properties file.
- Creating a custom file appender for separate test class logs.
19:08 🤔 Considerations for Logging in Automation
- Discussing the usefulness of logging in automation.
- Debating whether logging is necessary or if reporting suffices.
- Highlighting the burden of adding and maintaining logs in automation projects.
22:53 🧹 Building a Maven Project
- Explaining the process of building a Maven project.
- Using the “Maven clean install” command to build the project.
- Skipping test execution during the build process to save time.
24:29 🔍 Setting up the project and dependencies
- Explained the process of setting up a project and updating Maven dependencies.
- Highlighted the importance of checking the project’s folder structure and libraries used.
25:01 🔌 Analyzing third-party libraries
- Discussed the third-party libraries used in the project, including Selenium, TestNG, Apache API, Extend Report, and Log4J.
- Emphasized the significance of understanding the technology stack being used in the project.
25:43 🏃♀️ Exploring test runners and test classes
- Explored the test runners and test classes within the project, highlighting the listeners and test structures.
- Mentioned the usage of the base test class and the importance of organizing imports.
27:08 ⚙️ Understanding configuration properties
- Analyzed the configuration properties, including URL, headless browser, remote Hub URL, and Selenium Grid configurations.
- Emphasized the need to understand the configuration properties for running tests on a grid.
29:54 📂 Examining folder structure with the tree command
- Demonstrated the use of the
treecommand to visualize the project’s folder structure.
- Highlighted the benefits of using this command for documentation and understanding the project layout.
31:24 🐞 Debugging the code
- Walked through the process of debugging code, including setting breakpoints and inspecting variables.
- Showed how to use the debug perspective and expressions for detailed code analysis.
47:52 📝 Taking notes and best practices
- Advised taking notes, creating diagrams, and maintaining documentation to understand and remember the code structure.
- Highlighted the importance of confidence gained through debugging and thorough understanding of the project.
48:21 📦 Explaining Framework Architecture
- Hybrid framework with the Page Object Model design pattern.
- Utilizing TestNG for test execution.
- Custom utilities for Selenium actions.
52:34 ⚙️ Framework Features
- Data-driven approach with data providers and Excel sheets.
- Multi-environment support with separate configuration files.
- Cross-browser testing using Selenium Grid.
56:18 📚 Learning Process and Communication
- Explaining the team’s approach to improvements and suggestions.
- Maintaining good communication by providing logical reasons.
01:05:51 🥒 Using Cucumber with TestNG
- Clarifying the role of TestNG with Cucumber in test execution.
- No direct execution by Cucumber; it requires a test runner.
01:07:19 🏢 Environment Support in Framework
- Using properties files for configuring different environments.
- Implementing runtime configuration options for ease of use.
01:10:11 🧐 Maintaining Assertions in Page Object Model
- Assertions are a key part of Page Object Model (POM).
- Assertions should be written in the test class, not in the page class.
- Soft and hard assertions are commonly used in testing.
01:16:55 🏁 Running Test Cases Locally and Remotely
- Start by executing and testing scripts locally, focusing on Google Chrome.
- Later, expand testing to other browsers and remove hard-coded wait times.
- For remote execution, set up a Selenium dockerized grid on AWS for parallel testing.
- Utilize Jenkins and CI/CD pipelines for automated testing on cloud environments.