Homewrecker
Homewrecker

Reputation: 1106

Alternative to the deprecated Actions API for Firefox

I am currently running some Protractor tests against Firefox and I am running into some issues concerning the Actions API. Right clicking using the following does not work anymore:

browser.actions().click(protractor.Button.RIGHT).perform()

Protractor returns:

Failed: sendKeysToActiveElement
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '****', ip: '****', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.1', java.version: '1.8.0_181'
Driver info: driver.version: unknown

I found out that the Actions API is deprecated in favour of the W3C standard. I am all for following standards but I am currently blocked by this. It seems that Selenium v4.0.0-alpha fixes this issue but as Protractor still relies on an older version, I cannot seem to make this work.

So I am looking for a workaround. I already tried the protractor-firefox-support package, but that doesn't work either. Does anybody have a suggestion on how I can make this work?

Thanks in advance. Cheers

Upvotes: 0

Views: 285

Answers (1)

Ihor
Ihor

Reputation: 26

I had similar problems with angular-material components and solved it by adding dispatchEvent method.

Try it out. Here is example of its usage.

Upvotes: 1

Related Questions