I can run automated tests on both desktop and mobile devices using Protractor + Appium. However, there are problems to run a custom test that only work on Desktop / Mobile.
for example: One of my tests checks Breadcrumbs, which are displayed only in desktop screen resolution.
Could you please advise if there is a solution to check whether the test is running on the desktop or on a mobile device.
eg; it('check breadcrumb in website', function(){ if(isDesktop()){ contentItemPage.checkBreadCrumb(); } });
Similar to the following, to check if the browser is Chrome or not.
function isChromeBrowser(){ browser.getProcessedConfig().then(function(config) { if(config.capabilities.browserName.valueOf() === new String('chrome').valueOf()){ return true; } return false; }); }
Thanks in advance.
source share