nit
This commit is contained in:
parent
979f12a337
commit
68d1f309a8
|
|
@ -18,7 +18,7 @@ toc_max_heading_level: 2
|
||||||
|
|
||||||
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
|
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
|
||||||
```csharp
|
```csharp
|
||||||
const locator = page.getByRole('button');
|
var locator = Page.GetByRole(AriaRole.Button);
|
||||||
await Expect(locator).ToHaveAccessibleDescriptionAsync("Upload a photo");
|
await Expect(locator).ToHaveAccessibleDescriptionAsync("Upload a photo");
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ await Page.RemoveLocatorHandlerAsync(locator);
|
||||||
|
|
||||||
**Miscellaneous options**
|
**Miscellaneous options**
|
||||||
|
|
||||||
- [`multipart`](./api/class-apirequestcontext#api-request-context-fetch-option-multipart) option in `APIRequestContext.FetchAsync()` supports now repeating fields with the same name using [`method: FormData.append`]:
|
- [`Multipart`](./api/class-apirequestcontext#api-request-context-fetch-option-multipart) option in `APIRequestContext.FetchAsync()` supports now repeating fields with the same name using [`method: FormData.append`]:
|
||||||
```csharp
|
```csharp
|
||||||
var formData = Context.APIRequest.CreateFormData();
|
var formData = Context.APIRequest.CreateFormData();
|
||||||
formData.Append("file", new FilePayload()
|
formData.Append("file", new FilePayload()
|
||||||
|
|
|
||||||
|
|
@ -13,19 +13,19 @@ toc_max_heading_level: 2
|
||||||
- [`method: LocatorAssertions.toHaveAccessibleName`] checks if the element has the specified accessible name:
|
- [`method: LocatorAssertions.toHaveAccessibleName`] checks if the element has the specified accessible name:
|
||||||
```python
|
```python
|
||||||
locator = page.get_by_role("button")
|
locator = page.get_by_role("button")
|
||||||
await expect(locator).to_have_accessible_name("Submit")
|
expect(locator).to_have_accessible_name("Submit")
|
||||||
```
|
```
|
||||||
|
|
||||||
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
|
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
|
||||||
```python
|
```python
|
||||||
locator = page.get_by_role("button")
|
locator = page.get_by_role("button")
|
||||||
await expect(locator).to_have_accessible_description("Upload a photo")
|
expect(locator).to_have_accessible_description("Upload a photo")
|
||||||
```
|
```
|
||||||
|
|
||||||
- [`method: LocatorAssertions.toHaveRole`] checks if the element has the specified ARIA role:
|
- [`method: LocatorAssertions.toHaveRole`] checks if the element has the specified ARIA role:
|
||||||
```python
|
```python
|
||||||
locator = page.get_by_test_id("save-button")
|
locator = page.get_by_test_id("save-button")
|
||||||
await expect(locator).to_have_role("button")
|
expect(locator).to_have_role("button")
|
||||||
```
|
```
|
||||||
|
|
||||||
**Locator handler**
|
**Locator handler**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue