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.)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community