diff --git a/dotnet/docs/touch-events.mdx b/dotnet/docs/touch-events.mdx index ac44ffeaa97..247e46af8f8 100644 --- a/dotnet/docs/touch-events.mdx +++ b/dotnet/docs/touch-events.mdx @@ -10,6 +10,8 @@ import HTMLCard from '@site/src/components/HTMLCard'; Web applications that handle legacy [touch events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events) to respond to gestures like swipe, pinch, and tap can be tested by manually dispatching [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)s to the page. The examples below demonstrate how to use [Locator.DispatchEventAsync()](/api/class-locator.mdx#locator-dispatch-event) and pass [Touch](https://developer.mozilla.org/en-US/docs/Web/API/Touch) points as arguments. +Note that [Locator.DispatchEventAsync()](/api/class-locator.mdx#locator-dispatch-event) does not set [`Event.isTrusted`](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted) property. If your web page relies on it, make sure to disable `isTrusted` check during the test. + ### Emulating pan gesture In the example below, we emulate pan gesture that is expected to move the map. The app under test only uses `clientX/clientY` coordinates of the touch point, so we initialize just that. In a more complex scenario you may need to also set `pageX/pageY/screenX/screenY`, if your app needs them. diff --git a/java/docs/touch-events.mdx b/java/docs/touch-events.mdx index 566353bff89..1041b23f9af 100644 --- a/java/docs/touch-events.mdx +++ b/java/docs/touch-events.mdx @@ -10,6 +10,8 @@ import HTMLCard from '@site/src/components/HTMLCard'; Web applications that handle legacy [touch events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events) to respond to gestures like swipe, pinch, and tap can be tested by manually dispatching [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)s to the page. The examples below demonstrate how to use [Locator.dispatchEvent()](/api/class-locator.mdx#locator-dispatch-event) and pass [Touch](https://developer.mozilla.org/en-US/docs/Web/API/Touch) points as arguments. +Note that [Locator.dispatchEvent()](/api/class-locator.mdx#locator-dispatch-event) does not set [`Event.isTrusted`](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted) property. If your web page relies on it, make sure to disable `isTrusted` check during the test. + ### Emulating pan gesture In the example below, we emulate pan gesture that is expected to move the map. The app under test only uses `clientX/clientY` coordinates of the touch point, so we initialize just that. In a more complex scenario you may need to also set `pageX/pageY/screenX/screenY`, if your app needs them. diff --git a/nodejs/docs/touch-events.mdx b/nodejs/docs/touch-events.mdx index c6ead764d4a..512594c7863 100644 --- a/nodejs/docs/touch-events.mdx +++ b/nodejs/docs/touch-events.mdx @@ -10,6 +10,8 @@ import HTMLCard from '@site/src/components/HTMLCard'; Web applications that handle legacy [touch events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events) to respond to gestures like swipe, pinch, and tap can be tested by manually dispatching [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)s to the page. The examples below demonstrate how to use [locator.dispatchEvent()](/api/class-locator.mdx#locator-dispatch-event) and pass [Touch](https://developer.mozilla.org/en-US/docs/Web/API/Touch) points as arguments. +Note that [locator.dispatchEvent()](/api/class-locator.mdx#locator-dispatch-event) does not set [`Event.isTrusted`](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted) property. If your web page relies on it, make sure to disable `isTrusted` check during the test. + ### Emulating pan gesture In the example below, we emulate pan gesture that is expected to move the map. The app under test only uses `clientX/clientY` coordinates of the touch point, so we initialize just that. In a more complex scenario you may need to also set `pageX/pageY/screenX/screenY`, if your app needs them. diff --git a/python/docs/touch-events.mdx b/python/docs/touch-events.mdx index 3f9d6a5f0e5..a024dee6caf 100644 --- a/python/docs/touch-events.mdx +++ b/python/docs/touch-events.mdx @@ -10,6 +10,8 @@ import HTMLCard from '@site/src/components/HTMLCard'; Web applications that handle legacy [touch events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events) to respond to gestures like swipe, pinch, and tap can be tested by manually dispatching [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)s to the page. The examples below demonstrate how to use [locator.dispatch_event()](/api/class-locator.mdx#locator-dispatch-event) and pass [Touch](https://developer.mozilla.org/en-US/docs/Web/API/Touch) points as arguments. +Note that [locator.dispatch_event()](/api/class-locator.mdx#locator-dispatch-event) does not set [`Event.isTrusted`](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted) property. If your web page relies on it, make sure to disable `isTrusted` check during the test. + ### Emulating pan gesture In the example below, we emulate pan gesture that is expected to move the map. The app under test only uses `clientX/clientY` coordinates of the touch point, so we initialize just that. In a more complex scenario you may need to also set `pageX/pageY/screenX/screenY`, if your app needs them.