Skip to content

Instantly share code, notes, and snippets.

@ajuchacko
Created October 24, 2018 06:13
Show Gist options
  • Save ajuchacko/bb400d79f6b534cf8e46341e03d0620e to your computer and use it in GitHub Desktop.
Save ajuchacko/bb400d79f6b534cf8e46341e03d0620e to your computer and use it in GitHub Desktop.
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ExampleTest extends DuskTestCase
{
/**
* A basic browser test example.
*
* @return void
*/
public function testPayment()
{
$this->browse(function (Browser $browser) {
$browser->visit('/pay')
->press('Pay Now')
->waitFor('iframe[class=razorpay-checkout-frame]')
->assertSee('Test');
$browser->driver->switchTo()->frame('body > div > iframe');
$browser->assertSee('Vendor');
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment