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/





