This automation solution simulates a realistic QA / Customer Engineering workflow by:
- Navigating the EL PAÍS news website
- Extracting the latest Opinion articles
- Capturing:
- Spanish Titles 🇪🇸
- Article Content 📄
- Cover Images 🖼
- Translating titles to English 🇬🇧
- Performing repeated word analysis
- Executing locally and on BrowserStack
- Running tests in parallel across multiple browsers/devices
✔ Automate dynamic website interaction
✔ Demonstrate Selenium WebDriver expertise
✔ Implement robust DOM/content extraction
✔ Integrate Translation API
✔ Handle standard & gallery articles
✔ Enable parallel execution
✔ Perform post-processing data analysis
✔ Validate cross-browser compatibility
- Node.js
- Selenium WebDriver
- BrowserStack Automate
- RapidAPI – Google Translate
- JavaScript (ES6)
- dotenv
- Opens EL PAÍS homepage
- Handles cookie consent popup
- Navigates to Opinion section
- Identifies latest Opinion articles
- Filters valid URLs based on:
/opinion/- Date pattern (
YYYY-MM-DD)
Supports:
✔ Standard Articles
✔ Gallery / Photo Articles
Extraction Strategy:
- Uses
.a_standfirst(intro/summary) - Falls back to meaningful paragraph blocks
- Avoids UI noise & metadata clutter
- Detects article cover images (
figure img) - Downloads locally into
/images
- Uses RapidAPI (Google Translate)
- Handles API response parsing & failures
- Processes translated titles
- Detects words repeated more than twice
Outputs:
✔ Article details
✔ Translation table
✔ Word repetition analysis
✔ Execution logs
- Executes on cloud browsers/devices
- Debugging enabled
- Captures:
- Network logs
- Console logs
- Runs across 5 concurrent sessions
- Cross-browser / cross-device capable
- Dynamic session naming
✔ Windows / macOS
✔ Chrome / Firefox / Edge / Safari
Mobile execution was initiated but not fully functional.
Observed Issue:
- Navigation to Opinion section failed
- EL PAÍS mobile layout uses a hamburger menu
- Desktop selectors were incompatible with responsive UI
Key Takeaway:
✔ Demonstrates real-world responsive testing challenge
✔ Highlights importance of device-specific locators
✔ Validates complexity of cross-device automation
✔ End-to-end Selenium WebDriver automation
✔ Intelligent DOM/content extraction strategy
✔ Standard & gallery article handling
✔ API-driven title translation
✔ Parallel cross-browser execution
✔ BrowserStack cloud validation
✔ Post-processing text analysis
A short demonstration showcasing:
✔ Automated article extraction
✔ Spanish → English title translation
✔ Parallel BrowserStack execution
Issue: Cookie popup blocking navigation
✔ Solution: Explicit wait & popup handling logic implemented
Issue: Mobile navigation failure
✔ Cause: Responsive layout using hamburger menu
✔ Resolution: Requires device-specific locators
Issue: Translation API failure
✔ Solution: Implemented error handling & fallback logging
1. Install dependencies
npm install2. Configure environment variables
BROWSERSTACK_USERNAME=your_username
BROWSERSTACK_ACCESS_KEY=your_access_key
RAPIDAPI_KEY=your_api_key3. Execute the automation
node src/main.jsRohith Pradeep
🎓 Final Year Computer Engineering Student
🏫 Pillai College of Engineering
🔗 LinkedIn: linkedin.com/in/rohith-pradeep/





