title: Python Selenium sending varible output to element problem via .sendkeys
body: <p>When I send on Chrome a normal static string <code>usrname = 'usernamefoo'</code> to the signup form via <code>.sendkeys</code>, it works fine. But if I send the output of <code>usrname = rand_name_1 + rand_name_2 + rand_name_3</code> something strange happens, it presses the signup button. There is no code pointing to this element in the script. The same happens on any element that I pass the variable directly via .sendkeys, but not if it's a string. Is it because it sending direct input from a variable or could it be a bug? BTW the signup button is located at the very end of the web form.</p>
  <p>*<strong>edit</strong></p>
  <p>I think that it is sending a &quot;return&quot; after writing each variable from <code>usrname</code></p>
  <p>in console it shows :</p>
  <ul>
  <li>dog</li>
  <li>rabitt</li>
  <li>slap</li>
  </ul>
  <p>as the output of <code>ursname</code></p>
  <p>how do I format the output of <code>ursname</code> without carriage returns? just in case that is the actual problem?</p>
  <p>I'll add the construct of <code>usrname</code> code</p>
  <pre><code>rand_name_1 = random.choice(open('dognames.txt').readlines())
  rand_name_2 = random.choice(open('randomshit.txt').readlines())
  rand_name_3 = random.choice(open('Randomlovenames.txt').readlines())
  
  usrname = rand_name_1 + rand_name_2 + rand_name_3
  </code></pre>
  <p>So I've come to the conclusion that it does have a /n in the variable output</p>
  <p>I ran an unpack and returned this result</p>
  <p><code>['d', 'u', 'k', 'e', '\n', 's', 'u', 'm', '\n', 'b', 'r', 'e', 'a', 'k', '\n']</code></p>
  <p>if I work out how to take out the /n's than I'll post it here.</p>