fselvatici/ztltest — comment on commit bfce3b460643cb0f78935117b2b441eaf9fdbd99
File:  line 0
By jumperchen:

I change the testing case with the following code.

// Click on second item
clickAt(jq("@listitem .z-listcell-cnt"), "5,15");

// Record the selected item text
val itemText = jq(".z-listitem-seld").text();

verifyFalse("The selection cannot be empty", itemText.isEmpty());

// Press enter key
sendKeys(jq("@listbox").toWidget().$n("a"), Keys.ENTER);

waitResponse(true)
// Verify that the messagebox is visible
verifyTrue("The Messagebox should be visible", jq(".z-messagebox-window").exists());

// Press enter key again
sendKeys(jq("@button").toWidget().$n("btn"), Keys.ENTER);

// Verify that the selected item is the same as before
verifyTrue("The selected item changed", itemText.equals(jq(".z-listitem-seld").text()));

the sendKey() method of Selenium API in some browsers can only fire to the focused target where the element can support with, like Button, A(anchor), Input, and etc. So we must specify the focused target for that API, like __jq("@listbox").toWidget().$n("a")__

By the way, I will change it after merged your commitment.