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 8030017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:37:34+00:00 2026-06-05T00:37:34+00:00

Scenario: – We have registration form that checks for errors via AJAX – Fields

  • 0

Scenario:
– We have registration form that checks for errors via AJAX
– Fields are: email, confEmail, fname, lname, pwd, confPwd
– Error check happens when user enters in “email” field and tabs to “confEmail” field. Same for “pwd” and “confPwd” field
– I am trying to write automation script that mimics user behavior where user will enter “test” in “email” field and then tab to next field which is “confEmail”. This should invoke AJAX check and throw error about “invalid email address”

Test configuration:
– Test written in Linux
– Running in iPhone simulator on Mac (of course)

This piece of code enters email address:
driver.findElement(By.cssSelector(Locators.getLocator(“mobilebuy->emailAddressField”))).sendKeys(“test”);

Since sendKeys will not move focus away from that field, I then send TAB/click to next field so that the AJAX fires up. Apparently, doing that doesn’t work. The AJAX never fires and no error message shows up. I can see when I simulate this manually in iPhone simulator, it works.

This should tab to next field:
driver.findElement(By.cssSelector(Locators.getLocator(“mobilebuy->emailAddressField”))).sendKeys(Keys.TAB);

OR

This should click on next field which should fire AJAX:
driver.findElement(By.cssSelector(Locators.getLocator(“mobilebuy->confEmailAddressField”))).click();

ANY IDEA ON HOW TO PROCEED WITH THIS ISSUE? I LOOKED THROUGH IT CLOSELY AND EVEN TRIED TO PASS IN UNICODE FOR “TAB” KEY BUT THAT DIDN’T WORK EITHER.

  • 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-06-05T00:37:36+00:00Added an answer on June 5, 2026 at 12:37 am

    First of all, only the FirefoxDriver supports Action class (according to http://code.google.com/p/selenium/wiki/TipsAndTricks), but you should also expect support for the InternetExplorerDriver too.

    Got this to work using following steps:
    – I have a Type method which types items into the form
    – Thereafter, I send a click to the field that fires Ajax using Action class and that seemed to work

    // (WebDriver, email, confEmail, fname, lname, pwd, confPwd)
    TypeRegistrationData(driver, "test/tester@com", "", "", "", "", "");
    
    // action builder that tabs to next field
    WebElement we = driver.findElement(By.cssSelector(Locators.getLocator("buy->emailAddressField")));
    Actions builder = new Actions(driver);
    
    builder.click(we); // this fires up the ajax that is expected
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scenario: I have a console application that needs to access a network share with
Scenario: Most smartphones have a high resolution camera that generates photos that may range
Scenario: I have an application that has a config table which stores the config
Scenario: I have a directory on a server that hosts my website that contains
Scenario: I have several services that I want to be discovered by different clients.
Scenario I have a TreeView that is bound to ObservableCollection<T> . The collection gets
Scenario 1 (That Works) This is a POC i created. I have a script
Scenario: You have an ASP.Net webpage that should display the next image in a
Scenario: I have a text file that has pipe (as in the | character)
Scenario: At our company, we have enabled httpCompression for our website. This website (call

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.