title: How to extract text using RSelenium
body: <p>I have the following HTML:</p>
  <pre><code> &lt;h3&gt;&lt;a href='jobdetail.php?job=705945'&gt;Job Details&lt;/a&gt;: lrp1_vs_Hx1sh2&lt;/h3&gt;&lt;h4&gt;
  </code></pre>
  <p>With this code, I tried to extract the element value <code>lrp1_vs_Hx1sh2</code></p>
  <pre><code>library(RSelenium)
  webpage &lt;- &quot;https://cluspro.bu.edu/models.php?job=705945&quot;
  browser &lt;- remoteDriver(port = 5556)
  browser$open()
  browser$navigate(webpage)
  
  clk &lt;- browser$findElement(using = &quot;link text&quot;, &quot;Use the server without the benefits of your own account&quot;)
  clk$clickElement()
  
  jobs &lt;- browser$findElement(using = 'link text', &quot;Job Details&quot;)
  jobs$getElementText()
  </code></pre>
  <p>But it gives me <code>&quot;Job Details&quot;</code> instead.
  How can I do it correctly?</p>
  <hr />
  <p><strong>Update</strong></p>
  <p>THis is the full HTML:</p>
  <pre><code>        &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
              &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
          &lt;head&gt;
          &lt;title&gt;ClusPro 2.0: protein-protein docking&lt;/title&gt;
              &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
        &lt;link rel='stylesheet' type='text/css' href='/css/style.css' /&gt;
        &lt;link rel='stylesheet' type='text/css' href='/css/loginform.css' /&gt;
        &lt;link rel='stylesheet' type='text/css' href='/css/signupform.css' /&gt;
        &lt;link rel='stylesheet' type='text/css' href='/css/contactform.css' /&gt;
        &lt;link rel='stylesheet' type='text/css' href='/css/jobsform.css' /&gt;
        &lt;link rel='stylesheet' type='text/css' href='/css/goodform.css' /&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;//cdnjs.cloudflare.com/ajax/libs/yui/2.9.0/grids/grids-min.css&quot; /&gt;
        &lt;style type=&quot;text/css&quot;&gt;#tabResults { font-weight:bold; }&lt;/style&gt;      &lt;link rel=&quot;shortcut icon&quot; href=&quot;/favicon.png&quot; type=&quot;image/png&quot; /&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/jquery-3.5.1.min.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/jquery.equalheights.js&quot;&gt;&lt;/script&gt;
        
                       &lt;script type=&quot;text/javascript&quot;&gt;
                    
     var models = {
        reinit: function(){
           var showmodels = $('#showmodels').prop('value');
           $('td:gt('+showmodels+')').hide();
           $('td:eq('+showmodels+')').hide();
           $('td:lt('+showmodels+')').show();
           $('#modelslink').prop('href', 'zipmodels.php?job=705945&amp;coeffi=0&amp;nmodels='+showmodels);
        }
     }
  $(document).ready(function(){
     models.reinit();
     $('#showmodels').change(models.reinit);
  })
                 &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
        &lt;div id=&quot;doc&quot;&gt;
          &lt;div id=&quot;hd&quot;&gt;
            &lt;ul id='tabs-menu'&gt;
              &lt;li&gt;&lt;a id='tabContact' href='/contact.php'&gt;Contact&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id='tabHelp' href='/help.php'&gt;Help&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id='tabPapers' href='/publications.php'&gt;Papers&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a id='tabResults' href='/results.php'&gt;Results&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id='tabQueue' href='/queue.php'&gt;Queue&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id='tabDimer' href='/dimer_predict/submit.php'&gt;Dimer Classification&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id='tabPeptide' href='/peptide/index.php'&gt;Peptide Docking&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a id='tabDock' href='/home.php'&gt;Dock&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;img src='/image/ClusPro1.png' width='750' height='160' alt=''/&gt;
          &lt;/div&gt;
      &lt;div id=&quot;bd&quot;&gt;
          
            
          &lt;div id='main-header-right'&gt;
            &lt;a href='/logout.php'&gt;sign out&lt;/a&gt;
          &lt;/div&gt;
         &lt;h3&gt;&lt;a href='jobdetail.php?job=705945'&gt;Job Details&lt;/a&gt;: lrp1_vs_Hx1sh2&lt;/h3&gt;&lt;h4&gt;&lt;a href='scores.php?job=705945&amp;coeffi=0'&gt;View Model Scores&lt;/a&gt;&lt;/h4&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=0&amp;amp;filetype=model_bz2'&gt;Download all Models for all Coefficients&lt;/a&gt;&lt;div style=&quot;padding-top:1em;&quot;&gt;Balanced | &lt;a href='models.php?job=705945&amp;amp;coeffi=2'&gt;Electrostatic-favored&lt;/a&gt; | &lt;a href='models.php?job=705945&amp;amp;coeffi=4'&gt;Hydrophobic-favored&lt;/a&gt; | &lt;a href='models.php?job=705945&amp;amp;coeffi=6'&gt;VdW+Elec&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Display Models: &lt;form style='display:inline;'&gt;&lt;select id='showmodels'&gt;&lt;option value='10'&gt;10&lt;/option&gt;&lt;option value='15'&gt;15&lt;/option&gt;&lt;option value='20'&gt;20&lt;/option&gt;&lt;option value='23'&gt;23&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;&lt;/div&gt;&lt;br /&gt;&lt;a id='modelslink' href=''&gt;Download Displayed Models&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If you use these models in a paper, please cite our &lt;a href='publications.php'&gt;papers&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class='nice' id='models'&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=0&amp;amp;filetype=model_file'&gt;0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=0&amp;amp;filetype=model_img' alt='0' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=1&amp;amp;filetype=model_file'&gt;1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=1&amp;amp;filetype=model_img' alt='1' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=2&amp;amp;filetype=model_file'&gt;2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=2&amp;amp;filetype=model_img' alt='2' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=3&amp;amp;filetype=model_file'&gt;3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=3&amp;amp;filetype=model_img' alt='3' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=4&amp;amp;filetype=model_file'&gt;4&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=4&amp;amp;filetype=model_img' alt='4' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=5&amp;amp;filetype=model_file'&gt;5&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=5&amp;amp;filetype=model_img' alt='5' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=6&amp;amp;filetype=model_file'&gt;6&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=6&amp;amp;filetype=model_img' alt='6' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=7&amp;amp;filetype=model_file'&gt;7&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=7&amp;amp;filetype=model_img' alt='7' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=8&amp;amp;filetype=model_file'&gt;8&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=8&amp;amp;filetype=model_img' alt='8' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=9&amp;amp;filetype=model_file'&gt;9&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=9&amp;amp;filetype=model_img' alt='9' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=10&amp;amp;filetype=model_file'&gt;10&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=10&amp;amp;filetype=model_img' alt='10' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=11&amp;amp;filetype=model_file'&gt;11&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=11&amp;amp;filetype=model_img' alt='11' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=12&amp;amp;filetype=model_file'&gt;12&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=12&amp;amp;filetype=model_img' alt='12' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=13&amp;amp;filetype=model_file'&gt;13&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=13&amp;amp;filetype=model_img' alt='13' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=14&amp;amp;filetype=model_file'&gt;14&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=14&amp;amp;filetype=model_img' alt='14' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=15&amp;amp;filetype=model_file'&gt;15&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=15&amp;amp;filetype=model_img' alt='15' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=16&amp;amp;filetype=model_file'&gt;16&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=16&amp;amp;filetype=model_img' alt='16' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=17&amp;amp;filetype=model_file'&gt;17&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=17&amp;amp;filetype=model_img' alt='17' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=18&amp;amp;filetype=model_file'&gt;18&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=18&amp;amp;filetype=model_img' alt='18' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=19&amp;amp;filetype=model_file'&gt;19&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=19&amp;amp;filetype=model_img' alt='19' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=20&amp;amp;filetype=model_file'&gt;20&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=20&amp;amp;filetype=model_img' alt='20' /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=21&amp;amp;filetype=model_file'&gt;21&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=21&amp;amp;filetype=model_img' alt='21' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=22&amp;amp;filetype=model_file'&gt;22&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src='file.php?jobid=705945&amp;amp;coeffi=0&amp;amp;model=22&amp;amp;filetype=model_img' alt='22' /&gt;&lt;/td&gt;&lt;td&gt;23&lt;br /&gt;&lt;br /&gt;(image not found)&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;        &lt;/div&gt;
          &lt;div id=&quot;ft&quot;&gt;
            ClusPro should only be used for noncommercial purposes.
            &lt;br/&gt;
            &lt;a href='https://www.vajdalab.org' target='_blank'&gt;Vajda Lab&lt;/a&gt; and &lt;a href='http://abcgroup.cluspro.org'&gt;ABC Group&lt;/a&gt;
            &lt;br/&gt;
            &lt;a href='https://www.bu.edu/'&gt;Boston University&lt;/a&gt; and &lt;a href='http://www.stonybrook.edu'&gt;Stony Brook University&lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
      &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>