title: Testing Chrome Extension with Context Menu
body: <p>I am working on a Chrome Add On that adds context menu items using <a href="https://developer.chrome.com/extensions/contextMenus" rel="nofollow noreferrer"><code>chrome.contextMenus</code></a>.</p>
  
  <p>I am looking to create some tests as I develop the extension to ensure proper functionality. I have looked into using Selenium and similar, but there does not seem to be the concept of interacting with the "system" context menu, only context menus which are actually JavaScript called by intercepting right clicking. The solutions for the browser's real context menu seem a bit hacky.</p>
  
  <p>I am starting to look at things like autohotkey and AutoIt, but I am not sure that these are the best tools out there for this type of testing since Chrome doesn't use native Windows controls. </p>
  
  <p>I see there is some work with AutoIt <em><a href="https://www.autoitscript.com/forum/topic/154439-chrome-udf/" rel="nofollow noreferrer">Chrome UDF</a></em>, but I wanted to check if there was a purpose built tool that can consistently interact with the browser. I also want to check that other tabs are open, etc.</p>
  
  <hr>
  
  <p>I have read <a href="https://stackoverflow.com/questions/37373741/how-do-i-test-a-context-menu-entry-in-a-chrome-extension">How do I test a context menu entry in a Chrome Extension?</a> -> <a href="https://stackoverflow.com/questions/11428026/select-an-option-from-the-right-click-menu-in-selenium-webdriver-java">Select an Option from the Right-Click Menu in Selenium Webdriver - Java</a> , but I am not sure how this would work if you don't know which menu items might be present from other extensions or customizations.</p>