title: how to click button javascript
body: <p>I would like to be able to click this. I'm coding in c# and I'm using cefsharp embedded firefox. I came across the code below and I would like to click it if I can. For reference here is the definition for the ExecuteScriptAsync.</p>
  
  <pre><code>public void ExecuteScriptAsync(string script);
  </code></pre>
  
  <p>This lets me write javascript. In conjunction with the browser after it visits a webpage. For instance this lets me fill in an email form and password form and click sign in.</p>
  
  <pre><code>browser.ExecuteScriptAsync("document.getElementById('Email').value=" + '\'' + txtEmail.Text + '\'');   
  browser.ExecuteScriptAsync("document.getElementById('Passwd').value=" + '\'' + txtPassword.Text + '\'');     
  browser.ExecuteScriptAsync("document.getElementById('signIn').click()");
  </code></pre>
  
  <p>The below is what I would like to click if possible.</p>
  
  <pre><code>&lt;button class="KjTtD twEJfe uq" title="Call a phone"&gt;
  
      &lt;div class="rYvKwe"&gt;&lt;/div&gt;
  
  &lt;/button&gt;
  </code></pre>
  
  <p>While I can click it with my mouse. To get the above code I used firefox's inspect element Q. I've tried a few different ways of clicking it.</p>
  
  <p>Like below.</p>
  
  <pre><code>browser.ExecuteScriptAsync("$('#button a:eq(1)').click();");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>browser.ExecuteScriptAsync("document.getElementByTitle('Call a phone').click()");
  </code></pre>
  
  <p>Is it even possible to click it? If so can somebody point me in the right direction? Thanks!</p>