Laravel-Selenium icon indicating copy to clipboard operation
Laravel-Selenium copied to clipboard

method attachFile shown in wiki does not appear to exist

Open edgreenberg opened this issue 8 years ago • 3 comments

Thank you for your excellent package modelizer/laravel-selenium.

I am trying to test an uploaded file with:

            ->see(sprintf('Add an Image to %d', $this->Lodge->lodge_number))
            ->attachFile('image',  __DIR__.'/lodge81.jpg')
            ->type('My Image Description for '.$this->Lodge->lodge_name, 'description')
            ->press('Add Image!')

The error I get is: You cannot call a command with multiple method arguments.

The traceback points to the line containing ->attachFile

I am running modelizer/selenium 1.2.2.

I looked through my entire vendor directory, and cannot find attachFile.

What do I need to do?

edgreenberg avatar Feb 12 '17 17:02 edgreenberg

Thanks for raising this issue but as far as I know we don't have attachFile method. Please feel free to submit a PR.

Thanks. :)

Modelizer avatar Feb 12 '17 18:02 Modelizer

Shaikh, I agree that you don't have it in the code, but you do have it in the wiki for the project, along with the other methods.

If we don't have this method, what is the correct way to test uploading a file through the browser?

PS I don't know what a PR is.

edgreenberg avatar Feb 12 '17 18:02 edgreenberg

Okay, I will look into this issue. It will be added in 2.0 version of this package.

Modelizer avatar Feb 12 '17 19:02 Modelizer