Support the ongoing development of Laravel.io →
Packages Testing
Last updated 1 year ago.
0

Laracasts/Integrated actually provides their own specific API. It isn't very full, but if you need more you can use $this->session to access the underlying instaclick/php-webdriver. You can read more about that library in its docs, but the gist is that it basically uses Selenium's JSONWireProtocol as is. This requires sending arguments in a JSON-like array syntax.

Putting that together, you should be able to get this done something like:

public function test_add_poi_from_fleet_map(){
    $this->doLogin('test','test')
        ->click('#showMap')
        ->wait(5000);
    $this->session->moveto(['element' => '#mapContainer', 'xoffset' => 100, 'yoffset' => 100]);
    $this->session->click(['button' => 2]);
    // (button 2 is right click according to JSON wire protocol)
    $this->see('Add Point of interest');
}

(If you want to be able to chain those commands, you could create your own helper functions that return $this at the end. Then you could also collapse the arrays into traditional arguments if you prefer.)

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.