title: Google extension how to click a button on the web page?
body: <p>I create an extension
  file <strong>github.js</strong></p>
  
  <pre><code>jQuery(document).ready(function($) {
    console.log('github.js');
    // btn btn-primary shelf-cta
    var button = $('.btn.btn-primary.shelf-cta');
    console.log('button.html() = ', button.html());
    button.click();
  });
  </code></pre>
  
  <p>file popup.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;button id="send_messages"&gt;Send Messages&lt;/button&gt;
  
    &lt;script src="libs/jquery-v3.3.1.js"&gt;&lt;/script&gt;
    &lt;script src="popup.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>file <strong>popup.js</strong></p>
  
  <pre><code>jQuery(document).ready(function($) {
    console.log('popup.js');
  
    $('#send_messages').click(function(event) {
  
  
      console.log('github test');
      chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
        chrome.tabs.executeScript(
          tabs[0].id,
          {file: "libs/jquery-v3.3.1.js"},
          function(){
            chrome.tabs.executeScript(
              tabs[0].id,
              {file: "github.js"}
            );
          }
        );
      });
    });
  });
  </code></pre>
  
  <p>file <strong>manifest.json</strong></p>
  
  <pre><code>{
    "name": "test the extension",
    "version": "1.0",
    "description": "Automatically send the message to the opened projects in the browser",
    "permissions": [
      "tabs", 
      "activeTab", 
      "declarativeContent", 
      "storage",
      "&lt;all_urls&gt;"
    ],
    "options_page": "options.html",
    "background": {
      "scripts": ["background.js"],
      "persistent": false
    },
    "browser_action": {
      "default_popup": "popup.html",
      "default_icon": {
        "16": "images/get_started16.png",
        "32": "images/get_started32.png",
        "48": "images/get_started48.png",
        "128": "images/get_started128.png"
      }
    },
    "icons": {
      "16": "images/get_started16.png",
      "32": "images/get_started32.png",
      "48": "images/get_started48.png",
      "128": "images/get_started128.png"
    },
    "manifest_version": 2
  }
  </code></pre>
  
  <p>When I go to the github page <a href="https://github.com/" rel="nofollow noreferrer">https://github.com/</a>
  there is a button "read the guide", I want to click it.
  I press an extension browser_action button, shows a pop-up window. When I press a button "send a message" and nothing happens.
  I can reach the button "read the guide" and output the title but <strong>button.click();</strong> doesn't work.
  How to click the button or others link?</p>