shouldBe("window.pageYOffset", "0");
accessibilityController.addNotificationListener(function (target, notification) {
- if (target.role == 'AXRole: AXScrollArea') {
- debug('Got notification on scroll area');
+ if (target.role == 'AXRole: AXWebArea' && notification == 'ScrollPositionChanged') {
+ debug('Got notification on web area');
accessibilityController.removeNotificationListener();
shouldBe("window.pageYOffset", "500");
finishJSTest();