Skip to content

Commit

Permalink
Check if deviceName was passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit3200 committed Sep 13, 2023
1 parent b898956 commit 1209084
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/webdriver-utils/src/metadata/metaDataResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default class MetaDataResolver {
const platform = opts.platformName || opts.platform;
if (['ios', 'android'].includes(platform.toLowerCase()) ||
['ios', 'android'].includes(capabilities?.platformName?.toLowerCase()) ||
['ipad', 'iphone'].includes(capabilities?.device?.toString()?.toLowerCase())) {
['ipad', 'iphone'].includes(capabilities?.device?.toString()?.toLowerCase()) ||
opts?.deviceName !== undefined) {
return new MobileMetaData(driver, capabilities);
} else {
return new DesktopMetaData(driver, capabilities);
Expand Down

0 comments on commit 1209084

Please sign in to comment.