File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 240240 var exactLabelMatches = [ ] ;
241241 var anyLabelMatches = [ ] ;
242242 findPossibleMatches ( '//*[@aria-label and contains(@aria-label, "' + escapedText + '")]' +
243+ '| //a[@title and contains(@title, "' + escapedText + '")]' +
243244 '| //img[@alt and contains(@alt, "' + escapedText + '")]' , function ( match ) {
244245 // Add to array depending on if it's an exact or partial match.
245- var attributeData = match . getAttribute ( 'aria-label' ) || match . getAttribute ( 'alt' ) ;
246+ var attributeData = match . getAttribute ( 'aria-label' ) ||
247+ match . getAttribute ( 'title' ) ||
248+ match . getAttribute ( 'alt' ) ;
246249 if ( attributeData . trim ( ) === text ) {
247250 exactLabelMatches . push ( match ) ;
248251 } else {
Original file line number Diff line number Diff line change @@ -524,4 +524,15 @@ public function i_close_the_browser_tab_opened_by_the_app() {
524524 $ this ->getSession ()->getDriver ()->executeScript ('window.close() ' );
525525 $ this ->getSession ()->switchToWindow ($ names [0 ]);
526526 }
527+
528+ /**
529+ * Switch navigator online mode.
530+ *
531+ * @Given /^I switch offline mode to "(?P<offline_string>(?:[^"]|\\")*)"$/
532+ * @param string $offline New value for navigator online mode
533+ * @throws DriverException If the navigator.online mode is not available
534+ */
535+ public function i_switch_offline_mode (string $ offline ) {
536+ $ this ->getSession ()->evaluateScript ('appProvider.setForceOffline( ' . $ offline . '); ' );
537+ }
527538}
You can’t perform that action at this time.
0 commit comments