SwitchPreviousTab/SwitchNextTab work incorrectly on Safari
Step to reproduce:
- open 3-4 tabs
- call switchPreviousTab(2)
Actual Observe: It works incorrectly
NOTE: It’s only happen on Safari.
As I found that SwitchPreviousTab/SwitchNextTab call getWindowHandles. The getWindowHandles api on Safari return an array tabs that is not consistent with the tab display on browser.
e.g.:
Tab on Browser: tab1, tab2, tab3, tab4
getWindowHandles return: [tab1, tab4, tab2, tab3]