Skip to content

Commit

Permalink
Merge pull request #237 from asystance/disable-firefox-readerview-too…
Browse files Browse the repository at this point in the history
…ltip

Disable Firefox Reader View help tooltip
  • Loading branch information
gfosco committed Aug 12, 2015
2 parents 6b4ed44 + 252e5ac commit bb0fc1b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Remote/DesiredCapabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,17 @@ public static function chrome() {
* @return DesiredCapabilities
*/
public static function firefox() {
return new DesiredCapabilities(array(
$caps = new DesiredCapabilities(array(
WebDriverCapabilityType::BROWSER_NAME => WebDriverBrowserType::FIREFOX,
WebDriverCapabilityType::PLATFORM => WebDriverPlatform::ANY,
));

// disable the "Reader View" help tooltip, which can hide elements in the window.document
$profile = new FirefoxProfile();
$profile->setPreference('reader.parse-on-load.enabled', false);
$caps->setCapability(FirefoxDriver::PROFILE, $profile);

return $caps;
}

/**
Expand Down

0 comments on commit bb0fc1b

Please sign in to comment.