Mac OS- Using Protractor

If you are a QA Engineer then somewhere down the road you will come across Protractor/selenium and face limitations that come with automation. I faced a similar limitation when I had to copy a 7-page google document and paste it in my application to verify whether the formatting of the document is affected or not. So the problem here arises when we are working with mac OS.

Anteelo design - Mac OS- Using Protractor

macOS + Selenium/Protractor doesn’t allow native functions to be called, which in simple words means that you cannot perform either command +acommand + C, or command +v in mac.

OSX does not support native key events, so the Driver simulates all key presses. This means that the keypress is contained within the “content” window, so the browser probably never sees the COMMAND as it would from a native event.

So I had to find a workaround in order to conquer the wild elephants and I would be talking about the same in this blog

  • Cut: Shift+Delete
  • Copy: Ctrl+Insert
  • Paste: Shift+Insert
  • Select: SHIFT + Arrow_down

Select-All

`browser.actions().sendKeys(protractor.Key.chord(protractor.Key.SHIFT, protractor.Key.ARROW_DOWN)).perform();

Paste

`browser.actions().sendKeys(protractor.Key.chord(protractor.Key.SHIFT, protractor.Key.INSERT)).perform();}

Copy

`browser.actions().sendKeys(protractor.Key.chord(protractor.Key.CONTROL, protractor.Key.INSERT)).perform();

 

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn
<b><strong>Karan Makan</strong></b>

Karan Makan

Technology Engineer and Entrepreneur. Currently working with International Clients and helping them scale their products through different ventures. With over 8 years of experience and strong background in Internet Product Management, Growth & Business Strategy.

On Key

Related Posts

Application, Game, Bonuses & Earnings

Articles Is IDs and you will decades confirmation required? Chance Gains Gambling establishment Find the free revolves during the safe online casinos in the Gambling

Local casino Odense

Content Close Casinos Leading Online casinos to have France Higher Ranked Belongings Centered Gambling enterprises Online casino games offered Casino Odense Local casino Odense Remark

House

Articles Wider position range around the Alfcasino harbors and you can templates Cellular Betting Sense Cellular play feel round the Alf Gambling establishment application and

error: Content is protected !!