docs: auto generate evaluate usage docs

This commit is contained in:
Pavel Feldman 2025-01-23 11:18:45 -08:00
parent d2e7ad38d5
commit f4aa99135a
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).