← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #234883]: [research] Sikuli over WebDriver API / JSONWireProtocol?

 

Question #234883 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/234883

daluu posted a new comment:
Also in terms of finding images or checking if something (image) exists
with Sikuli, in WebDriver that would simply be

WebElement result = driver.findElement(By.name("imageA.png"));

WebElements result = driver.findElements(By.name("imageB.png"));

where Sikuli would return a reference to the found image
encapsulated/defined as a WebElement (as defined by WebDriver API /
JSONWireProtocol).

For findElement, if not found, we throw exception (pass exception from
Sikuli up to WebDriver, massaging messaging as needed).

For findElements, if not found, we return a null/empty list of
WebElements. If found, we return the result (e.g. 1 element list). I
don't know whether Sikuli can find multiple matches, and if yes, then we
return all those references as a list of WebElements. No exception is
ever thrown for findElements, just an empty list.

And click(), sendKeys(), basically is a chained call to findElement(s)
first then using the found reference invoke the click/sendKeys against
that element and get back any return value from it.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.