File tree 1 file changed +6
-4
lines changed
src/Magento/FunctionalTestingFramework/Extension
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,12 @@ private function __construct()
48
48
public function logErrors ($ webDriver , $ stepEvent )
49
49
{
50
50
//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
+ }
55
57
}
56
58
}
57
59
}
You can’t perform that action at this time.
0 commit comments