HabrAugust 10, 2026🇷🇺Translated from Russian

Building a Minimalist UI Test Framework with Playwright and Pytest

Vladislav Timashenkov from InfoWatch shares a streamlined method for building a UI test automation framework. The approach emphasizes direct use of Playwright capabilities rather than wrapping them in custom abstractions.

The framework starts by launching a single Chromium browser process for the entire test session using a session-scoped fixture. Settings such as headless mode and slow motion are stored separately in BROWSER_SETTINGS to allow environment-specific configuration through variables or files.

Authentication is handled without UI interaction. A factory fixture uses the requests library to call the login API endpoint and extracts cookies for later use in browser contexts. This design supports multiple users during a single test run.

Isolated BrowserContext instances provide test separation. A context factory fixture accepts authentication data, applies CONTEXT_SETTINGS including base URL and locale, and ensures all contexts are closed after each test function.

The page fixture combines the authenticated user data with the context factory to deliver a ready-to-use page object. Because the fixture scope is function-level, every test receives a fresh page with pre-applied cookies.

Page Object classes encapsulate business logic only. Locators are exposed as properties that return fresh Locator instances on each access, taking advantage of Playwright’s lazy evaluation and automatic waiting. Methods such as create_tag and delete_tag_by_name perform interactions without additional explicit waits.

A sample test demonstrates creating a tag with generated data from Faker and verifying visibility using the expect assertion API. The article concludes that this minimal infrastructure scales easily as new page objects are added.

Related articles

AntiMalwareOther

Russia Develops Domestic ERA-GLONASS System for Public Transport Tracking During GPS and GLONASS Disruptions

AO GLONASS has created a national system that maintains real-time monitoring of buses and trolleybuses even when satellite navigation signals are jammed or lost. The solution relies on the state-run ERA-GLONASS platform, placing autonomous markers at stops and identifiers on vehicles to record exact positions without depending on GPS or GLONASS. Data is transmitted over a protected ERA-GLONASS communication channel that remains available during mobile internet restrictions thanks to inclusion in official white lists. The first deployment begins in Kaluga on 1 September, covering three trolleybus routes with live tracking for passengers, dispatchers, carriers, and mapping services. The battery-powered markers are designed for five years of maintenance-free operation in any weather and are built entirely with Russian components and encryption algorithms. Future plans include extending the technology to municipal vehicles and emergency services fleets.

HabrOther

OSINT for the Lazy Part 16: Discovering Hidden Corporate Infrastructure Through Shodan

The article explains how Shodan differs from traditional search engines by indexing internet-connected devices such as servers, routers, cameras, databases, and admin panels rather than web pages. It provides ten practical search techniques including hostname queries, SSL certificate searches, ASN lookups, IP range scans, and targeted queries for development environments, admin panels, and databases. Examples demonstrate how forgotten dev.company.com or staging.company.com hosts, open Jenkins or Grafana dashboards, and exposed MongoDB or Redis instances can be located with simple filters. The piece walks through a five-step real-world workflow that combines domain, SSL, organization, and service-title searches to map a target company’s infrastructure. It emphasizes that Shodan only reveals services already exposed to the internet and does not perform any exploitation. Common root causes listed include forgotten test servers, rushed DevOps configurations, and misconfigured firewalls. The article concludes with a reminder that many organizations remain unaware their internal systems are visible to anyone using the same techniques.

AntiMalwareOther

Rostelecom Outage Triggers 29-Minute Mass Disruptions Across Russian Internet Services

A 29-minute failure in Rostelecom's data transmission network on August 6 caused widespread access problems to Russian online services. The operator quickly rerouted traffic to backup equipment, restoring normal operations without revealing the root cause. Users reported issues connecting to marketplaces, banks, social platforms, IT company services and other telecom providers. The majority of complaints originated from Rostelecom's own subscribers who experienced connection and service access failures. Although the incident remained brief and did not escalate into prolonged digital disruption, it highlighted the heavy reliance on a single major provider. The event demonstrated how even a short technical problem at a large operator can simultaneously affect access to stores, financial services and everyday online platforms.

HabrOther

Read-Only Utility Automates Detailed Audits of UserGate NGFW Firewall Policies

A cybersecurity specialist at Gazprom CPS developed a read-only utility to analyze large-scale UserGate NGFW firewall policies without making any configuration changes. The tool connects via the UserGate XML-RPC API to collect rules, statistics, zones, network lists, services, users, and groups, then normalizes the data into a unified model for analysis. It performs eleven independent checks grouped into lifecycle, overly permissive access, observability, and documentation categories, flagging rules that have not fired recently, allow management ports broadly, lack logging, or have empty descriptions. Results are exported to a navigable Excel report featuring a rules-by-checks matrix, human-readable object names, and editable manual verdicts such as OK, requires attention, or false positive. The first full run on a production policy with over 1000 rules and 4500 related objects took 24 minutes and highlighted 39 percent of rules for review, with more than half showing multiple red flags. The approach preserves the original snapshot in JSON for repeatable offline analysis and comparison over time.