0

I've a web application with JSF 2.2, PrimeFaces 6.0.

All is working fine, but I don't know in which way I can interact with the fileUpload component coming from Prime Faces.

In which way can I upload a file using Arquillian, Graphene and Drone?

Just for example, here the interaction with some other components, like textItems and dropdowns

    @Test
    @RunAsClient
    public void testCarManufacturersAndModels() {
        Graphene.guardAjax(indexPage.getCarManufacturersDropdown()).selectByVisibleText("Ajax");
        frontendTestComponent.waitForJStoLoad(browser);
        frontendTestComponent.checkSelect(indexPage.getCarModelsDropdown(), 1, true);

        Graphene.guardAjax(indexPage.getContinentsDropdown()).selectByValue("1");
        frontendTestComponent.waitForJStoLoad(browser);
        frontendTestComponent.checkSelect(indexPage.getCountriesDropdown(), 45, true);
    }

The frontendTestComponent is a my class just to avoid to repeat always the same code.

Thank you!

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Gavi
  • 1,300
  • 1
  • 19
  • 39
  • There is not much specific to Graphene here. Well, guardAjax may be helpful - depending on how you set up the p:fileUpload it may or may not use AJAX. But in general you're better off searching for answers about uploading a file with selenium. With or without primefaces. E.g. http://stackoverflow.com/questions/13474471/primefaces-fileupload-testing-with-selenium-webdriver – Vsevolod Golovanov Apr 11 '17 at 13:54
  • Possible duplicate of [PrimeFaces fileUpload testing with Selenium WebDriver](https://stackoverflow.com/questions/13474471/primefaces-fileupload-testing-with-selenium-webdriver) – Kalle Richter Oct 16 '17 at 10:12

0 Answers0