Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6693361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:58:27+00:00 2026-05-26T05:58:27+00:00

As part of a Selenium integration test, I wrote the two following lines in

  • 0

As part of a Selenium integration test, I wrote the two following lines in Ruby to simulate entering an e-mail address into a text field and “moving the focus away”:

  @driver.find_element(:id, "user_email").send_keys "user@example.com"
  @driver.find_element(:id, "some_other_element").click

The second line is not generic enough, because some_other_element might be unknown or non-existent. Thus, I wanted to replace the action of clicking another element with a TAB keystroke:

  @driver.find_element(:id, "user_email").send_keys :tab

However, this does not seem to work, the element user_email does not lose its focus as expected. Also replacing :tab with “\xEE\x80\x84” does not help. Does anyone know what could be wrong here? How can I move the focus away of an element without simulating a click somewhere else?

Thanks for any help,
Dominik

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:58:27+00:00Added an answer on May 26, 2026 at 5:58 am

    I don’t know how to do it without simulating a click, but clicking on <body> worked for me. This solution may be generic enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following xpath statement in a selenium test: //tbody/tr[td/span[text()='IPODate']]/td[4]/input It gets what
How to approach the following scenario? Say a test is already running in selenium
As part of my Selenium test for a login function, I would like to
I'm writing a Selenium IDE script to test part of our website that opens
I have a Selenium test case that enters dates into a date selector made
I am attempting to run my selenium test suite as part of a continues
As part of my test automation, I have to start Selenium Server on my
I'm working on a project using Scala running Selenium tests as part of a
Part of a complex query that our app is running contains the lines: ...(inner
i am trying to run selenium tests as part of maven build, and this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.