Hello, I am writing Java tests using Test NG. Faced such a problem: There is a method for selecting value from a drop-down list (see example below)
public void selectItemByValue(WebElement element, int index) { Select dropdown = new Select(element); dropdown.selectByIndex(index); } Here is a section of code from which I need to select one element (I need to select an employee) - http://prntscr.com/i8qrgj
When you run the test - gives an error -
'org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been "select" but was "div"
Can not find a solution, please help who has already encountered this. (What an error means I understand, but how to solve it is not quite)