I'm struggling to populate a dropdown I can get it to select it but unsure on what to do to select the value:
var TitleField = WDS.browser.findElement(pkg.By.id('Title'))
TitleField.click()
TitleField.sendKeys(['Mr'])
I've seen some articles and it says you have to import a driver:
var driver = JavaImporter(org.openqa.selenium.support.ui.Select)
Select selectObject = new Select(driver.findElement(By.id(Title)));
selectObject.selectByValue('Mr');
But this stops the whole test from running.
Can someone clarify what I need to do to select the dropdown value using javascript?
Thanks