Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

React Native Debugger Client

A Python client for interacting with React Native applications via the Hermes debugger.

Features

  • Connect to a React Native app's Hermes debugger
  • Execute JavaScript code in the React Native context
  • Interact with UI elements (tap, scroll, enter text)
  • Get the React component tree
  • Navigate between screens
  • Debug utilities (toggle debug features, performance overlay)
  • Widget finder utilities

Installation

pip install react-native-debugger-client

Usage

Basic Usage

from react_native_debugger_client import ReactNativeDebuggerClient

# Connect to a React Native app running on your device or emulator
client = ReactNativeDebuggerClient(device_ip="localhost", metro_port=8081)
success, message = client.connect()

if success:
    # Get the UI tree
    ui_tree = client.get_ui_tree()
    
    # Tap a button
    client.tap_element(test_id="submit_button")
    
    # Enter text in an input field
    client.enter_text(test_id="email_input", text="user@example.com")
    
    # Scroll down
    client.scroll("down")
    
    # Navigate to a screen
    client.navigate_to_screen("HomeScreen")
    
    # Execute custom JavaScript
    client.execute_js("console.log('Hello from Python!');")
    
    # Close the connection when done
    client.close()

Context Manager

You can also use the client as a context manager:

with ReactNativeDebuggerClient() as client:
    success, message = client.connect()
    if success:
        client.tap_element(text="Login")

API Reference

Connection

  • __init__(device_ip="localhost", metro_port=8081) - Initialize the client
  • connect(timeout=10) - Connect to the React Native app's Hermes debugger
  • close() - Close the connection

UI Interaction

  • tap_element(test_id=None, text=None, timeout=5) - Tap an element by test ID or text content
  • enter_text(test_id, text, timeout=5) - Enter text into a TextInput element
  • scroll(direction="down", distance=300, timeout=5) - Scroll the screen
  • scroll_element(test_id=None, direction="down", distance=300, timeout=5) - Scroll a specific element

Navigation

  • get_current_screen(timeout=5) - Get the name of the current screen
  • navigate_to_screen(screen_name, params=None, timeout=5) - Navigate to a specific screen

Widget Utilities

  • find_widgets(search_by="all", search_value="", timeout=5) - Find widgets matching criteria
  • tap_widget_by_key(key_value, timeout=5) - Tap a widget by its key
  • tap_widget_by_text(text, timeout=5) - Tap a widget by its text content
  • tap_widget_by_type(widget_type, timeout=5) - Tap a widget by its type
  • tap_widget_by_tooltip(tooltip_text, timeout=5) - Tap a widget by its tooltip text
  • enter_text_by_key(key_value, text, timeout=5) - Enter text in a widget by its key
  • enter_text_by_type(widget_type, text, timeout=5) - Enter text in a widget by its type
  • enter_text_by_text(widget_text, text, timeout=5) - Enter text in a widget by its text content

Debug Utilities

  • toggle_debug_paint_feature(enable=True, timeout=5) - Toggle debug paint feature
  • toggle_performance_overlay(enable=True, timeout=5) - Toggle performance overlay
  • toggle_repaint_rainbow(enable=True, timeout=5) - Toggle repaint rainbow
  • toggle_debug_banner(enable=True, timeout=5) - Toggle debug banner

Requirements

  • Python 3.7+
  • requests>=2.28.0
  • websocket-client>=1.3.0

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for react-native-debugger-client 0.0.1.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for react-native-debugger-client 0.0.1.dev1
File Size Uploaded Provenance Actions
react_native_debugger_client-0.0.1.dev1.tar.gz 17.8 kB Without provenance Details for react_native_debugger_client-0.0.1.dev1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for react-native-debugger-client 0.0.1.dev1
File Interpreter ABI Platform Actions
react_native_debugger_client-0.0.1.dev1-py3-none-any.whl Python 3 none any Details for react_native_debugger_client-0.0.1.dev1-py3-none-any.whl

Total release size: 36.9 kB

Release files / react_native_debugger_client-0.0.1.dev1.tar.gz

Download URL react_native_debugger_client-0.0.1.dev1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49253700b8866a0b648e846f12020ea629c394bc7ed5b8f88e92a694335c1e13
BLAKE2b-256 checksum
How to use checksums
fc41d24242aa5ad76022fe46a743f9dc781fbb9784908fa3b7234969b6a33857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / react_native_debugger_client-0.0.1.dev1-py3-none-any.whl

Download URL react_native_debugger_client-0.0.1.dev1-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02f4f06fc8c2ca62196982ee944920b1ddaa99e3437409252b5daadf2ec65c16
BLAKE2b-256 checksum
How to use checksums
13ad5a5f4b74fbf6bfa164db3c3333fe070c78db5e4409619b7808cdbcdbd2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for react-native-debugger-client 0.0.1.dev1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page