Code Monkey home page Code Monkey logo

selenium-teste's Introduction

Selenium

This is a test repository for learning and test Laravel Dusk with Selenium.

Step-by-Step

  1. Install composer library on Laravel project:
composer require --dev laravel/dusk
  1. Do the Laravel Dusk install command.
php artisan dusk:install
  1. Add on .env file the username and API Key of LambdaTest, both can be found in your acoount profile.

.env

LT_USERNAME="your username" 
LT_ACCESS_KEY="your access key"
  1. in the folder tests/DuskTestCase.php comment the content of prepare() method and add in driver method before return:
$options = (new ChromeOptions)->addArguments([
            '--headless',
            '--disable-gpu',
            '--no-sandbox',
            '--ignore-certificate-errors',
        ]);

        $username = env('LT_USERNAME');
        $access_key = env('LT_ACCESS_KEY');
        $url = "https://".$username.":".$access_key."@hub.lambdatest.com/wd/hub";

        return RemoteWebDriver::create($url, {DesiredCapabilities});
  1. Replace {DesiredCapabilities} by the contents generated by this link. Important that 'tunnel' is set as true to everything work.
  2. Download the lambdatest zip achive and extract the LT binary.
  3. Then in terminal in same folder that are the LT binary copy and paste the command in "configure tunel" of lambdatest dashboard (remember to select 'home' checkbox) and replace '/home/selenium' for the path to public folder of project.
  4. Generate the test:

php artisan dusk:make {class}Test

  1. Write the tests.

  2. Test:

php artisan dusk

selenium-teste's People

Contributors

camilotk avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.