File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/Magento/FunctionalTestingFramework/Extension Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,12 @@ private function __construct()
4848 public function logErrors ($ webDriver , $ stepEvent )
4949 {
5050 //Types available should be "server", "browser", "driver". Only care about browser at the moment.
51- $ browserLogEntries = $ webDriver ->manage ()->getLog ("browser " );
52- foreach ($ browserLogEntries as $ entry ) {
53- if (array_key_exists ("source " , $ entry ) && $ entry ["source " ] === "javascript " ) {
54- $ this ->logError ("javascript " , $ stepEvent , $ entry );
51+ if (in_array ("browser " , $ webDriver ->manage ()->getAvailableLogTypes ())) {
52+ $ browserLogEntries = $ webDriver ->manage ()->getLog ("browser " );
53+ foreach ($ browserLogEntries as $ entry ) {
54+ if (array_key_exists ("source " , $ entry ) && $ entry ["source " ] === "javascript " ) {
55+ $ this ->logError ("javascript " , $ stepEvent , $ entry );
56+ }
5557 }
5658 }
5759 }
You can’t perform that action at this time.
0 commit comments