I am using Selenium but for UI content I am using Sikuli and i want to incorporate them with my Selenium script is there any way I can do that???

Thanks in advance...

有帮助吗?

解决方案

Mohd Wasi Hirekudi,

 /**
 * Clicks a button. SIKULI Example
 * 
 * @throws FindFailed
 */
public void clickSikuliBtn() throws FindFailed {

    if (debugMode)
        ToolBox.logMessage(new Exception("Entered"));

    // Verify Button present
    // Click the button.
    screen.find("IMG_LIBRARY + Test.png");

    try {

        screen.drag("IMG_LIBRARY + Test.png");
        screen.click("IMG_LIBRARY + Test.png");

    } catch (NoSuchElementException e) {
        fail("Button not found");
    }

    if (debugMode)
        ToolBox.logMessage(new Exception("Leaving"));
}

This is a sample of how we use the Sikuli functions in out Test Suites. This will all depend on how you have set up your framework. We have Pages.java files that are then used in our Test.java files which get called from our TestSuite.java files. You set up your methods on the Pages and set up specific tests in the Tests and run different tests in the Suites.

The link referenced below your question has some great information for you to look at as well Question #3666140. Some things to keep in mind, it all depends on what framework you are developing on and how you have set up your framework for Testing.

Regards.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top