daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $process = (new ChromeProcess)->toProcess();
  2.     $process->start();
  3.     $options = (new ChromeOptions)->addArguments(['--disable-gpu', '--headless','--enable-file-cookies','--disable-web-security','--allow-file-access-from-files']);
  4.     $capabilities = DesiredCapabilities::chrome()->setCapability(ChromeOptions::CAPABILITY, $options);
  5.  
  6.     $driver = retry(5, function () use ($capabilities) {
  7.         return RemoteWebDriver::create('http://localhost:9515', $capabilities);
  8.     }, 50);
  9. $browser = new Browser($driver);
  10.         $browser::$baseUrl = 'https://example.com';
  11.         $browser->visit('/login')
  12.         ->type('username','1375344')
  13.         ->type('password','23444')
  14.         ->press('.login_btn');
  15.         $browser->waitForText('welcome');
  16.         $browser->get('/statement/deposit/view');
  17.         $browser->dump();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top