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

  • Home
  • SEARCH
  • 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 7871231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:50:39+00:00 2026-06-03T01:50:39+00:00

After a click event I need to wait for an elements attribute to change

  • 0

After a click event I need to wait for an elements attribute to change before proceeding further (click event causes certain elements to move out of focus and certain others get focus via a JS)

After spending time searching for a reliable alternative to “waitForAttribute” (selenium 1 command) in web driver… I could get the below code to work. But I am not sure if this is the best implementation…

Any other better solution??

wait = new WebDriverWait(wedriver1, TimeSpan.FromSeconds(5));
.....
button.Click();
wait.Until(webdriver1 => webdriver2.webelement.GetAttribute("style").Contains("display: block"));

Also, can anyone please share a link to how I can handle AJAX event changes using webdriver.

  • 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-03T01:50:40+00:00Added an answer on June 3, 2026 at 1:50 am

    It’s a recurring problem of Selenium.
    I am not sure about a “best” implementation existing. I believe it’s largely depending on the situation.

    Concerning AJAX-driven changes, I would generally use a waitForElementPresent or a waitForElementNotPresent depending on the changes the AJAX call will make on the page.

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

Sidebar

Related Questions

I need to vary a table 's width after a click event in jQuery.
My function Event.observe(n,click,respondClick) execute respondClick ON click. But I need to execute respondclick AFTER
I want to change data on listview runtime after button click... here is my
I need to detect a procedure from a click event has finished without delaying
I have a .click() event on an element. After it's closed, this mob has
I'm creating a Tic tac toe game, in that after click made by user
I'm using jQuery BlockUI Plugin and I'd like to do Javascript:history back(); after Click
I want to call setTimeout() after a click occurs. If the user clicks again
I am facing a problem while disabling the command button after one click. I
I'm trying to get java to perform one action after one click and then

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.