Protractor: Click is working fine on browser but not mobile emulation

Created on 19 Dec 2017  路  2Comments  路  Source: angular/protractor

Hi there!

  • Node Version: v6.11.4
  • Protractor Version: v5.2.2
  • Angular Version: v1.4.12
  • Browser(s): Chrome 63.0.3239.84

  • ChromeDriver: 2.34

  • Operating System and Version: Mac High Sierra
  • Your protractor configuration file

    SpecReporter = require('jasmine-spec-reporter').SpecReporter;

    exports.config =
        seleniumAddress: 'http://localhost:4444/wd/hub'
        specs: ['protractor-spec.js']
        ignoreUncaughtExceptions: true
        allScriptsTimeout: 60000 # 60 seconds timeout
        capabilities: {
            browserName: 'chrome',
            chromeOptions: {
#                'mobileEmulation' : {
#                    'deviceName': 'Nexus 5X'
#                },

                'args': [
                    '--auto-open-devtools-for-tabs'
                ]
            },

        }
        jasmineNodeOpts: print: ->
        onPrepare: ->
            jasmine.getEnv().addReporter(new SpecReporter({
                spec: {
                    displayStacktrace: false
                }
            }));
  • A relevant example test
describe "Coming Soon tab", ->

        it 'should be able to navigate to Coming Soon tab.', ->
            comingSoonButton = element(By.cssContainingText('.tab__title', 'Coming Soon'))
            comingSoonButton.click()

        it 'should show Coming Soon tab.', ->
            waitForLoading()
            expect(browser.getCurrentUrl()).toContain "/coming-soon"

The test running fine on normal chrome browser, but once I enable mobileEmulation the click() will cause the browser show right click menu. I suspect it did a right click when mobileEmulation enabled.

Anyone having the same issue that I facing?

android chrome external bug filed

Most helpful comment

Browser(s): Chrome 63.0.3239.108
ChromeDriver: 2.34

I am facing the same issue on chromedriver 2.34 with mobile and tablet emulators. When webdriver fires a click command, a right click menu is opened on the element instead of a click. So it seems to be treating click as right click on mobile and tablet emulators. Since I'm using java bindings and @nexstreamray is using Protractor, it seems to be related to chromedriver. Also, I tried running emulator test with chromedriver 2.33 on chrome 63.0.3239.108, it worked fine. So it might have to do something with chromedriver 2.34 not chrome 63.0.3239.108.

looks like an issue with chromedriver : https://bugs.chromium.org/p/chromedriver/issues/detail?id=2172

All 2 comments

Browser(s): Chrome 63.0.3239.108
ChromeDriver: 2.34

I am facing the same issue on chromedriver 2.34 with mobile and tablet emulators. When webdriver fires a click command, a right click menu is opened on the element instead of a click. So it seems to be treating click as right click on mobile and tablet emulators. Since I'm using java bindings and @nexstreamray is using Protractor, it seems to be related to chromedriver. Also, I tried running emulator test with chromedriver 2.33 on chrome 63.0.3239.108, it worked fine. So it might have to do something with chromedriver 2.34 not chrome 63.0.3239.108.

looks like an issue with chromedriver : https://bugs.chromium.org/p/chromedriver/issues/detail?id=2172

Hi there,

This is an external issue, I'm going to close it for now.

Was this page helpful?
0 / 5 - 0 ratings