Closed Danp2 closed 2 years ago
Function should verify that that calling routine supplied multiple options to match.
I plan to handle this issue in https://github.com/Danp2/au3WebDriver/pull/367
Also, the Select element should be queried for
multiselect
capability and return an error if it isn't.
In case of error should any selecting/dispatch action should be taken on <select>
element ?
What kind of error you propose ?
In case of error should any selecting/dispatch action should be taken on select element?
No. This validation should take place before performing any other actions.
What kind of error you propose ?
I haven't thought about it TBH. Perhaps $_WD_ERROR_InvalidArgue
or $_WD_ERROR_ElementIssue
.
$_WD_ERROR_ElementIssue
sounds better.
this discussion has pointed out a few weak points with the current "multiselect" implementation --
No validation that the target select element supports multiselect
No validation that multiple selections were requested
It is suplemented here: _WD_ElementSelectAction + SINGLESELECT #367
Enforced minimum of two options for multiSelect here -- https://github.com/Danp2/au3WebDriver/blob/9122d4fb2825f9aefa515a9cbc0e96e98fbe2b23/wd_helper.au3#L1052
selectAll
should do the same (validate SelectElement.multiple == false
)
I will make separate PR
Enforced minimum of two options for multiSelect here --
reverted: https://github.com/Danp2/au3WebDriver/pull/367#discussion_r942347772
selectAll
should do the same (validateSelectElement.multiple == false
) I will make separate PR
Bug report
Describe the bug
There is currently no validation taking place when executing the Multiselect option of _WD_ElementSelectAction
How to reproduce
Steps to reproduce the behavior (e.g.):
See link below for full context
Expected behavior
Function should verify that that calling routine supplied multiple options to match. Also, the Select element should be queried for
multiselect
capability and return an error if it isn't.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1505272
System under test
Please complete the following information.