This is what i am trying to achieve
1. Click on the first element in a list.
2. Press the <shift> keys and hold it down.
3. Using the right arrow key/mouse click, select the elements next to the first element.
I have tried these two approaches with the following problems:
driver.keyboard.PressKey(Keys.Shift);.
driver.keyboard.PressKey(Keys.ArrowRight):
driver.keyboard.ReleaseKey(Keys.Shift);
Problem: This works great in IE and Chrome, but in Firefox it just clicks on the first element and then moves the selection with the arrow key instead of keeping the multi-select. Is this a known issue?
The other approach is:
Actions a = new Actions(driver);
a.KeyDown(Keys.Shift).MoveToElement(WebDriverSetup.driver.FindElementByXPath(ThumbnailViewerUI.second_thumbnail),0,0).Click().Perform();
In this the selection moves with the click, instead being multiselect it just selects the second element.
Am i missing something? please let me know how I can go about doing this.