ShadowdriverJS v2.0.2 BETA released 05/11/2025
We're thrilled to announce the release of ShadowdriverJS v2.0.2 BETA! This version brings significant improvements to web automation testing, making it more robust and developer-friendly than ever before.
What's New in v2.0.2 BETA?
1. Smarter Element Waiting
Gone are the days of flaky tests due to timing issues. Our new waitFor()
method makes element interaction more reliable:
// Wait for elements to be ready before interaction
await element(by.id("loginBtn")).waitFor({
condition: "enabled",
timeout: 10000
})
// Handle loading states gracefully
await element(by.xpath("//*[contains(text(),'Loading...')]"))
.waitFor({
condition: "elementIsNotVisible",
timeout: 10000
})
2. Enhanced Form Handling
Say goodbye to form interaction headaches. Our improved form handling makes it easier to work with dynamic forms:
// Clean and intuitive form interaction
const email = await element(by.id("email"))
await email.sendKeys("test@test.com")
const password = await element(by.id("password"))
await password.sendKeys("password1234")
3. Better Element State Management
New conditions for element state checking make your tests more reliable:
// Check if elements are displayed before interaction
await element(by.id("email")).isDisplayed()
.then(async function (present) {
if (present) {
console.log("email field is present")
await element(by.id("email")).sendKeys("test@test.com")
}
})
4. Improved Toast Message Handling
Working with toast messages is now easier than ever:
// Reliable toast message verification
await element(by.css('[class="toast-body"]'))
.waitFor({ condition: "isPresent" })
.then(async (element) => {
const text = await element.getText()
expect(text).contains("test@test.com")
})
5. Custom Wait Functions
Create your own wait conditions for complex scenarios:
async function waitFor(locator, dTimeout = 10000) {
return await browser.wait(
waitUntil.elementIsVisible(locator),
dTimeout
)
}
Why Upgrade?
- More Reliable Tests: Reduced flakiness with improved waiting mechanisms
- Better Developer Experience: Cleaner API and more intuitive syntax
- Enhanced Debugging: Better error messages and state validation
- Flexible Timeouts: Customizable waiting periods for different scenarios
Getting Started
Upgrade to v2.0.2 BETA today and experience the difference in your test automation:
npm install shadowdriverjs@2.0.2
What's Coming Next?
We're working on something amazing! Stay tuned for more exciting features in our stable release. 😊
// Preview of upcoming features
await element(by.name("shadowdriverJS_is_awesome")).somethingAmazingComing({...args})
Have questions or feedback? Join our community on GitHub and help shape the future of ShadowdriverJS!