Skip to main content

parse_result

Function parse_result 

Source
pub fn parse_result(result: &Value) -> Value
Expand description

Parses a result from Playwright’s evaluate methods.

This is a convenience wrapper around parse_value for parsing evaluation results. It handles the common case where you receive a result from evaluateExpression or similar methods.

§Arguments

  • result - The result value from Playwright

§Returns

The parsed value as a serde_json::Value

§Examples

use playwright_rs::protocol::parse_result;
use serde_json::json;

// Parse evaluation result
let result = parse_result(&json!({"s": "hello"}));
assert_eq!(result, json!("hello"));