docs: auto generate evaluate usage docs (#34458)

This commit is contained in:
Pavel Feldman 2025-01-23 12:11:54 -08:00 committed by GitHub
parent 04c03b998a
commit 039f513744
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 37 deletions

View File

@ -864,31 +864,6 @@ If [`param: expression`] throws or rejects, this method throws.
**Usage**
```js
const tweets = page.locator('.tweet .retweets');
expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
```
```java
Locator tweets = page.locator(".tweet .retweets");
assertEquals("10 retweets", tweets.evaluate("node => node.innerText"));
```
```python async
tweets = page.locator(".tweet .retweets")
assert await tweets.evaluate("node => node.innerText") == "10 retweets"
```
```python sync
tweets = page.locator(".tweet .retweets")
assert tweets.evaluate("node => node.innerText") == "10 retweets"
```
```csharp
var tweets = page.Locator(".tweet .retweets");
Assert.AreEqual("10 retweets", await tweets.EvaluateAsync("node => node.innerText"));
```
### param: Locator.evaluate.expression = %%-evaluate-expression-%%
* since: v1.14

View File

@ -12176,12 +12176,6 @@ export interface Locator {
* rejects, this method throws.
*
* **Usage**
*
* ```js
* const tweets = page.locator('.tweet .retweets');
* expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
* ```
*
* @param pageFunction Function to be evaluated in the page context.
* @param arg Optional argument to pass to
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
@ -12207,12 +12201,6 @@ export interface Locator {
* rejects, this method throws.
*
* **Usage**
*
* ```js
* const tweets = page.locator('.tweet .retweets');
* expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
* ```
*
* @param pageFunction Function to be evaluated in the page context.
* @param arg Optional argument to pass to
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).