FTR: fix WebDriver Actions calls#44605
Conversation
💔 Build Failed |
💚 Build Succeeded |
| const PageObjects = getPageObjects(['dashboard']); | ||
|
|
||
| describe('dashboard grid', function () { | ||
| this.tags(['skipFirefox']); |
There was a problem hiding this comment.
Now this test is passing in Firefox as well
| const newDurationHours = await PageObjects.timePicker.getTimeDurationInHours(); | ||
| expect(Math.round(newDurationHours)).to.be(3); | ||
| const rowData = await PageObjects.discover.getDocTableIndex(1); | ||
| const rowData = await PageObjects.discover.getDocTableField(1); |
There was a problem hiding this comment.
In case of failure, we were getting a long string with all fields. To simplify analysis getDocTableField returns the date only.
| offset ? { x: offset.x, y: offset.y } : { x: 0, y: 0 }; | ||
|
|
||
| if (from.location instanceof WebElementWrapper === false) { | ||
| throw new Error('Dragging point should be WebElementWrapper instance'); |
There was a problem hiding this comment.
To avoid confusing while getting this error. InvalidArgumentError: invalid argument: at least an element or offset should be set │ (Session info: chrome=76.0.3809.132) │ (Driver info: chromedriver=76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}),platform=Mac OS X 10.14.6 x86_64)
In non-w3c start point should be provided as WebElement
💚 Build Succeeded |
💔 Build Failed |
|
Running I changed my display scaling from 175% to 100% thinking this could fix the issue but it failed again with a different time; This test is actually failing for me on master (on Windows, running Chrome headless) :-( I could try this PR (and master) on Ubuntu and make another update here. |
|
Ran the brush test on Ubuntu 18 on Chrome and it still failed; |
|
That brush test passed for me locally on Ubuntu when I ran it |
💚 Build Succeeded |
|
@LeeDr Since brushing test fails on Windows with master code, I think we need to address the issue in separate PR. Probably it will require additional work on window scaling size, that you already started some time ago. I checked the code again, and I do not make any specific changes to dragNdrop in Chrome, but splitting logic to make it easy to read and support. |
* [services/web_element_wrapper] add actions API methods * fixes * [services/browser] fix dragAnDrop to work in both w3c/non-w3c modes * small review changes * dragAndDrop: add default values for offset
…ete-for-distance_feature * 'master' of github.com:elastic/kibana: (89 commits) Replace TSVB timeseries charts with elastic-charts (elastic#33558) [TSVB][Top N aggregation] Unable to deal with negative values (elastic#43581) [alerting] Adds Action Type configuration support and whitelisting (elastic#44483) FTR: fix WebDriver Actions calls (elastic#44605) [Code] add NodeRepositoriesService to watch new repositories on local node (elastic#44677) [skip-ci][Maps] Improve Maps intro page (elastic#44721) [Maps] Update titles and descriptions for data sources (elastic#44833) Types + Extract Integration Util (elastic#44433) Downgrade log level from info to debug for cases when we cannot handle authentication attempt. (elastic#44933) [Reporting] Remove Chome stdout/stderr observables, Add Browser Logger observable (elastic#44359) Update Jest script to output coverage (elastic#44447) [ftr] support --kibana-install-dir flag (elastic#44552) [WATCHER] Allow user to set a threshold value of 0 (elastic#44810) Remove injectI18n in dashboard plugin. (elastic#44580) [Graph] Save modal (elastic#44261) Use external script for the OIDC Implicit flow handler page. (elastic#44866) disable router prefixing with pluginId (elastic#44855) [SIEM] Fix bug on url + inspect functionality on hosts/hostDetails page (elastic#44671) [ML] File data viz limiting uploaded doc chunk size (elastic#44768) [code] Append go env variable 'GOCACHE' to go lsp spawn command. (elastic#44864) ...
…plate * 'master' of github.com:elastic/kibana: (91 commits) [APM] Make number of x ticks responsive to the plot width (elastic#44870) [ML] Single metric viewer: Fix top nav refresh behaviour. (elastic#44860) Replace TSVB timeseries charts with elastic-charts (elastic#33558) [TSVB][Top N aggregation] Unable to deal with negative values (elastic#43581) [alerting] Adds Action Type configuration support and whitelisting (elastic#44483) FTR: fix WebDriver Actions calls (elastic#44605) [Code] add NodeRepositoriesService to watch new repositories on local node (elastic#44677) [skip-ci][Maps] Improve Maps intro page (elastic#44721) [Maps] Update titles and descriptions for data sources (elastic#44833) Types + Extract Integration Util (elastic#44433) Downgrade log level from info to debug for cases when we cannot handle authentication attempt. (elastic#44933) [Reporting] Remove Chome stdout/stderr observables, Add Browser Logger observable (elastic#44359) Update Jest script to output coverage (elastic#44447) [ftr] support --kibana-install-dir flag (elastic#44552) [WATCHER] Allow user to set a threshold value of 0 (elastic#44810) Remove injectI18n in dashboard plugin. (elastic#44580) [Graph] Save modal (elastic#44261) Use external script for the OIDC Implicit flow handler page. (elastic#44866) disable router prefixing with pluginId (elastic#44855) [SIEM] Fix bug on url + inspect functionality on hosts/hostDetails page (elastic#44671) ...
* [services/web_element_wrapper] add actions API methods * fixes * [services/browser] fix dragAnDrop to work in both w3c/non-w3c modes * small review changes * dragAndDrop: add default values for offset
* [services/web_element_wrapper] add actions API methods * fixes * [services/browser] fix dragAnDrop to work in both w3c/non-w3c modes * small review changes * dragAndDrop: add default values for offset
Summary
I noticed that the same functions work different while called on
browserandwebElementWrapper, e.g.browser.moveMouseTovselement.moveMouseTo. Running some of them in Firefox causes exceptions.This PR contains the following changes:
moveMouseTo,clickMouseButton,doubleClickcan be executed onWebElementWrapperinstance directlybrowserservice should be used to do the same operation using screen coordinates (pointer)w3cturned on: probably the main reason behind it, is that now offset is calculated from element center box (per W3C spec) and before it was the top left cornerChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers