With reference to the following screenshot,
I am trying to automate clicking of the down button by using the following code :
driver.findElement(By.xpath("//div[@class = 'search-start-time']//*[@aria-label ='Hours']//*[@class = 'mbsc-sc-btn mbsc-sc-btn-plus mbsc-ic mbsc-ic-arrow-down5']")).click();
Initially, the page loks like this
The selected values are highlighted in blue. In normal scenario, once user click the up or down button, the values will be scrolled accordingly into the blue selected section.
However, after applying my above code, the supposed-to-be-static blue value is scrolled as well, and the result is as follow :
Hope to have advice what mistake I have commit. Let me know if the info is not enough.