Hey Everyone,
You have been very helpful on my katalon journey so far. I have discovered a something slightly annoying that im wondering if anyone has any ideas on. I have a drop down list that wont display the available list of drop down values when the test is executing until I move my mouse over the field manually during test execution.
I have tried the below commands and it works maybe 30% of the time, does anyone have any other ideas?
WebUI.click(findTestObject('CRM/Page_Opportunity Opportunity New Opportunity - Microsoft Dynamics 365/input_Customer Account_Selection_v1'))
WebUI.mouseOver(findTestObject('CRM/Page_Opportunity Opportunity New Opportunity - Microsoft Dynamics 365/input_Customer Account_Selection_v1'))
I’ve used these in the past. It’s been a long time since I used them so I can’t vouch for them…
/**
* Hover over an element.
* @param selector (String) CSS selector for the element.
*/
static void Se_hover(String selector) {
WebDriver driver = DriverFactory.getWebDriver()
WebElement elem = driver.findElement(By.cssSelector(selector))
Actions act = new Actions(driver)
act.moveToElement(elem).build().perform()
}
/**
* Hover over an element then click it.
* @param selector (String) CSS selector for the element.
*/
static void Se_hoverClick(String selector) {
WebDriver driver = DriverFactory.getWebDriver()
WebElement elem = driver.findElement(By.cssSelector(selector))
Actions act = new Actions(driver)
act.moveToElement(elem).click(elem).build().perform()
}
You might want to consider adding scrollIntoView
(in javascript).
2 Likes
Thanks for the help, this has managed to solve my problem 
1 Like