Issue
in webview ,
i got two dropdownlist element with same option value
at first dropdownlist, i could select an option value by
onWebView(Matchers.allOf(isDisplayed(), isJavascriptEnabled()))
.withElement(findElement(Locator.XPATH, "//option[@value='01']"))
.perform(webClick());
then, the result also action in first dropdownliast while i paste the same code
i though XPATH is search form head, so second dropdownlist won't work
anyone could help me how to select option value in second dropdownlist?
Solution
update my answer as below
i think i slove by myself, i add second parameter to check value, show as below
onWebView(Matchers.allOf(isDisplayed(), isJavascriptEnabled()))
.withElement(findElement(Locator.XPATH, "//dd[@class='visitorBirth']//option[@value='01']"))
.perform(webClick());
Answered By - HunterChen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.