Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Javascript Articles
Page 428 of 534
Explain Keyword driven framework.
Keyword driven framework is also known as table driven framework. Here we have a table where we describe the keywords or actions for the methods that have to be executed. Automation test scripts are developed based on the keywords or actions mentioned in excel. The automation testers need to extend the framework capabilities by updating or building newer keywords. Framework Structure People working on manual testing with lesser programming knowledge can use this framework. The main idea is to identify the keywords or actions and utilize them in excel maintained for that particular test scenario. Often this ...
Read MoreState differences between Data Driven and Keyword Driven Framework.
Data Driven and Keyword Driven frameworks are two popular approaches in test automation. Understanding their differences helps choose the right framework for your testing needs. Data Driven Framework In data driven testing, we run tests on multiple data sets using parameterization. The data acts as input to the test script logic, with each data set representing a separate test case. The framework revolves around data maintained in external files (Excel, CSV, JSON) which is updated for individual test cases without changing the core test script logic. Example: Data Driven Login Test // Sample data ...
Read MoreExplain Behavior Driven Framework.
Behavior Driven Development (BDD) is a software development framework that brings together all project stakeholders including developers, testers, product owners, managers, customers, and business analysts. The main goal is to ensure everyone shares the same understanding of the application's requirements and behavior. BDD emphasizes collaboration and coordination among team members by describing functional requirements in plain, non-technical language that everyone can understand. This eliminates the need for deep technical coding knowledge when discussing specifications. How BDD Works The BDD process follows a structured approach that focuses on the application's behavior rather than its technical implementation: ...
Read MoreHow to disable future dates in JavaScript Datepicker?
Disabling future dates in a JavaScript datepicker prevents users from selecting dates beyond today. This is commonly needed for applications like booking systems, report generators, or any form where only past or current dates are valid. Understanding the maxDate Property The maxDate property sets the maximum selectable date in a datepicker. By setting it to the current date, all future dates become disabled and unclickable. Example: jQuery UI Datepicker ...
Read MoreHow to disable default behavior of when you press enter with JavaScript?
To disable the default behavior when the Enter key is pressed, you need to use the keydown event listener along with preventDefault(). This prevents the browser from executing its default action for the Enter key. How It Works The preventDefault() method cancels the default action that belongs to the event. When combined with checking for the Enter key (event.key === "Enter"), it stops the browser's default behavior like form submission or input validation. Example Disable Enter Key Default ...
Read MoreHow can I disable JavaScript click function if link starts with #?
In JavaScript, you can disable click functionality for links that start with "#" using preventDefault() and CSS selectors. This technique prevents hash links from executing click handlers while allowing normal links to work. Problem Sometimes you need to apply click handlers to most links but exclude hash links (href="#") that are used for navigation or placeholder purposes. Solution Using jQuery Use the :not() selector to exclude links with href="#" from the click handler: Disable Hash Link Clicks ...
Read MoreUnicode Property Escapes JavaScript Regular Expressions
Unicode property escapes in JavaScript regular expressions allow you to match characters based on their Unicode properties using the u flag. This feature enables precise matching of characters by their Unicode categories, scripts, or properties. Syntax /\p{PropertyName}/u /\P{PropertyName}/u // Negated form The \p{} matches characters with the specified property, while \P{} matches characters WITHOUT that property. Common Unicode Properties Property Description Example Characters Letter Any letter A, B, α, β, 中 Number Any number 1, 2, ①, ② Emoji_Presentation Emoji characters 😀, 🌟, 🎉 ...
Read MoreLookbehind Assertions JavaScript Regular Expressions
Lookbehind assertions in JavaScript regular expressions allow you to match a pattern only when it's preceded by a specific pattern. They use the syntax (? Syntax // Positive lookbehind - match if preceded by pattern (?Example: Extracting Prices with Positive Lookbehind This example matches numbers that are preceded by a dollar sign: Lookbehind Assertions The prices are $50, $99, $121 and $150. But 25 and 75 are not prices. Extract Prices ...
Read MoreNamed capture groups JavaScript Regular Expressions
Named capture groups in JavaScript regular expressions allow you to assign names to captured groups, making your code more readable and maintainable. Instead of accessing groups by index, you can reference them by meaningful names. Syntax // Named capture group syntax /(?pattern)/ // Accessing named groups match.groups.name Basic Example Named Capture Groups const text = "The year I graduated was 2012."; ...
Read MoreExplain the callback Promise.finally in JavaScript
The Promise.finally() method executes a callback function when a promise settles, regardless of whether it's fulfilled or rejected. This method is essential for cleanup operations and tasks that must run after promise completion. Syntax promise.finally(callback) Parameters callback: A function that executes when the promise settles. It receives no arguments and its return value is ignored. How It Works Unlike .then() and .catch(), the finally callback doesn't receive the promise's result or rejection reason. It simply indicates that the promise has completed. Example with Fetch API ...
Read More