I’m currently using full xpath to find an element in JavaSelenium. The element has no id, so I only have div’s and class to go on, here is my code.
driver.findElement(By.xpath("/html/body/root/app-root/div/div[2]/resource-utilisation/div/div[2]/div[2]/div[2]/div[2]/utilisation-input/div/div[2]/div/div/div[1]/div/ng-select")).getText()
Is there a way to find a class after another class you have found?
E.g., something like,
driver.findElements(By.xpath("//*[@class='resource-utilisation']//*[@class='utilisation-input']//*[@class='ng-select']"))