This commit is contained in:
Max Schmitt 2024-05-17 10:57:15 +02:00
parent 979f12a337
commit 68d1f309a8
2 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ toc_max_heading_level: 2
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
```csharp
const locator = page.getByRole('button');
var locator = Page.GetByRole(AriaRole.Button);
await Expect(locator).ToHaveAccessibleDescriptionAsync("Upload a photo");
```
@ -48,7 +48,7 @@ await Page.RemoveLocatorHandlerAsync(locator);
**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
var formData = Context.APIRequest.CreateFormData();
formData.Append("file", new FilePayload()

View file

@ -13,19 +13,19 @@ toc_max_heading_level: 2
- [`method: LocatorAssertions.toHaveAccessibleName`] checks if the element has the specified accessible name:
```python
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:
```python
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:
```python
locator = page.get_by_test_id("save-button")
await expect(locator).to_have_role("button")
expect(locator).to_have_role("button")
```
**Locator handler**