om / arsenic
Simple PHP selenium IDE generator
Installs: 2 030
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Type:tool
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2022-05-11 12:32:05 UTC
README
Simple PHP selenium IDE generator.
<?php
Arsenic::comment('Logout')->open('/logout')->deleteCookie('PHPSESSID')->open('/');
Arsenic::toFile('logout.html', 'Logout from application');
// login
Arsenic::waitForVisible($loginForm = '//form[@id="loginForm"]');
Arsenic::click('//a[@id="showLoginForm"]');
Arsenic::type($loginForm . '//input[@id="email"]', 'email@gmail.com');
Arsenic::type($loginForm . '//input[@id="password"]', '123456');
Arsenic::clickAndWait($loginForm . '//input[@type="submit"]');
Arsenic::waitForPageToLoad(3000);
Arsenic::comment('comment');
// repeats
for ($i = 0; $i < 5; $i++) {
Arsenic::open('/404/' . $i);
}
// file export
Arsenic::toFile('example.html', 'title');