Modelizer / Laravel-Selenium

Selenium Testing for Laravel 5
MIT License
108 stars 33 forks source link

method attachFile shown in wiki does not appear to exist #37

Open edgreenberg opened 7 years ago

edgreenberg commented 7 years ago

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?

Modelizer commented 7 years ago

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. :)

edgreenberg commented 7 years ago

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.

Modelizer commented 7 years ago

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