checking the microphone and webcam

What's a good amount of time to wait before replying to a text?

Community QA

Add New Question Ask a Question 200 characters left Include your email address to get a message when this question is answered. Submit


What About Texting Your Ex?

Now let’s dig into this very special situation – what if you’ve broken up for a while and you’ve stayed silent, and you’ve been patient.

OR – maybe you “took some time apart” – or “time off…”

What now?

Should you text your ex-boyfriend first, or should you wait for him to text you?

This is a different situation, and it really requi

This is a different situation, and it really requires that you know more about where your ex’s head is at. Before you text him, I suggest you gather some intel on what’s going on with him.

If you have any friends in common, you should talk to them directly to see what’s going on with him. After all, you don’t want to try reaching him when he’s in another relationship where he’s happy. But you might have an opportunity if he’s single and he’s been talking about you, right?

Whether or not you talk to his friends, you can always do a little Facebook stalking to find out what’s going on, too. Take a look at the activity on his page and see what he’s been up to. If he’s traveling the world, he might not be open to meeting you at Starbucks. But if all he’s been doing is binging on his streaming shows, you might have a chance.

But What About Messaging Your Ex Boyfriend?

The best way to text anyone you’ve been out of contact with for a while is to be very brief. Send something that is just a friendly check-in, and then pay attention to how quickly he responds – and how much he responds.

Send him something like this: “Hey, Jim – I was just watching a show last night that reminded me of you…”

OR: “Hey, I was going to eat at (some restaurant you went to with him) – did you know they closed?”

You don’t want to mention the show because this will tickle his curiosity a bit more. And it offers him an excuse to respond – even if it’s only to ask you “Which show?”

Texting Dating Tip: Keep it light and short, with no emotional heaviness in it. You want there to be as little friction as possible for him to respond. If he feels the weight of your emotions in the message, it could make him very leery of responding.

Don’t say things like:

  • Wish we were together…
  • Missing you…
  • My heart hurts…
  • Will you give me another chance…?
  • How are you doing…?
  • Do you miss me…?

If it sounds like you’re a dumpster fire of heartbreak, you’ll freak him out.

After you text him, you just use your instincts to tell you how best to interpret his response.

But again, don’t get caught up in playing the interpretation game. MAYBE show his response to a friend to get feedback, but don’t read into it. Take it at face value.

If he’s at all interested in seeing you or talking again, he’ll suggest it. You honestly don’t want to try to rekindle a romance with a guy who can’t find the energy or guts to ask you for a coffee or to dial you up on the phone.


Rule 5:  Is He Texting You Back?

If this is texting tennis, is he returning your “serve?”

Another signal that a woman can look for when she’s wondering whether or not to text him is his response pattern.

  • Does he text you back?
  • Does he text as much as you do? (in size)
  • Does he text with the same speed?

If you've already been texting a guy, and let's sa

If you’ve already been texting a guy, and let’s say he “went dark” and stopped responding, you would expect that he would eventually get back to you. (Maybe something came up – like his phone died or he got a call.)

But if he stops responding to your texts regularly, he may be telling you that he’s just not much of a text messaging dude. Men don’t text as much as women do.

“… women talk an average of 818 minutes a month on the phone, compared to 640 minutes per month for men. And women send out more text messages per month, 716 to the average man’s 555 texts.”

Men also typically text women they are in a relationship with, or starting one. He might text his family on the side, but that’s about it.

FACT: Guys do NOT typically text their guy friends – to chat or otherwise

We only text to check on plans or ask a quick opinion. That’s about it.

So when you text him and he’s hitting it back to you like in tennis, that’s a reasonable pattern that will happen at the beginning. You’re both excited about the possibilities, and that will mean you’ll text more frequently.

But he will likely slow his texting down after a while.

Now, some guys just don’t text all that much at the start, either. Some guys just don’t find it engaging or fun – and they are probably also still worried about what he SHOULD be texting you. So don’t be surprised if your text message pattern feels more like dodgeball. (You fire a text at him and he just runs…)

Sometimes the best thing is just to ask him if he’s an active texting kind of guy. If you get a lot of one-word replies, the guy is obviously not into texting.

And be sure to find out what HIS definition of “texting a lot” REALLY means. He could think that 2 texts a day is frequent! It’s all relative.

Selenium WebDriverWait in Practice: A JavaScript Tutorial

Time to roll up your sleeves and learn how to create tests that make use of waits in Selenium. There are three steps: First, we install the tools we’re going to need. Then, we obtain the application we’re going to test. Finally, we write and run our tests.

Installing the Requirements

The first tool we have to install is Node.js. That’s because our Selenium tests will live inside a Node.js application and also because we’ll need Node package manager (npm) to install a few tools. Go to the Node.js download page, download the adequate installer for your platform, and install it.

After you’ve installed Node.js, you’ll use npm to install the packages we’ll need. As we’ve mentioned, Selenium provides versions of the WebDriver for the main browsers. For this tutorial, we’re going to use the driver for the Chrome browser. You can install it globally by running this command:

1 npm install -g chromedriver

Let’s also install HTTP-server, which is—you guessed it!—a handy and light HTTP server we can start via command line. We’ll need it to serve the sample application we’ll obtain in the next step. Let’s install the server globally:

1 npm install -g http -server

Now, let’s create the structure for our test. Follow the steps below to create a folder, initiate a new Node.js project inside it, and add the WebDriver JavaScript library as a dependency to it:

1234 mkdir webdriverwait -demo cd webdriverwait -demo npm init -y npm install –save -dev selenium -webdriver

The first two lines create a new directory and change to it. In the third line, we create a project, passing the -y argument so that Node.js doesn’t ask questions and goes with the defaults. The fourth and final line installs the selenium-webdriver package as a development dependency (that’s what the –save-dev option means).

We’re done! At least with regards to installation. Let’s now get our sample application.

Getting the Sample Application to Test

Our sample application will be a simple issue tracker written in plain, vanilla JavaScript. You can find it on this GitHub repo. Clone it using Git or download it as a zip. No matter how you get it, put it in an easy-to-find folder. Then, access that folder by the command line and run HTTP-server. You should see a message letting you know that the server was successfully initialized. Now, go to http://localhost:8080. You should see something like this:

Now you’re all set up and ready to start wri

Now you’re all set up and ready to start writing your tests. Before we get to that, though, let’s manually test the app. Write a description of an issue and choose a severity and an assignee. Then, click on “Add.”

If everything went right, you should see a loading gif for a few seconds and, after that, the issue listed below the form:

Now, click on “Close.” You’ll se

Now, click on “Close.” You’ll see the loading again, and after it’s gone, you’ll see the issue labeled as closed:

Finally, click on “Delete.” You’

Finally, click on “Delete.” You’ll experience the loading again, and after that, the issue should no longer be listed.

The loading you’ve experienced wasn’t originally part of the app; it was added so we could see WebDriverWait in action. Anyway, now you’re all set up and ready to write tests and learn how to wait in Selenium.

Writing Tests

We’ll write our tests in three stages. First, we’ll write a test without waiting so you can see what happens when we try to interact with an element that’s not there. Then, we’ll fix the problem twice, using a different type of wait for each. Let’s get started.

Testing Without Waits

Inside your webdriverwait-demo folder, create a new text file and call it nowait.js. Using your favorite text editor—I’m using Visual Studio Code—add the following content to the file:


1234567891011 const { Builder , By } =require ( “selenium-webdriver” ) ; async function test ( ) { let driver =await new Builder ( ) . forBrowser ( “chrome” ) . build ( ) ; await driver . get ( “http://localhost:8080” ) ; await driver . findElement ( By . id ( “issueDescInput” ) ) . sendKeys ( “Typo in README file” ) ; await driver . findElement ( By . id ( “issueAssignedToInput” ) ) . sendKeys ( “Project Maintainer” ) ; await driver . findElement ( By . className ( “btn-primary” ) ) . click ( ) ; } test ( ) ;

The code starts by requiring the selenium-webdriver library and importing the functions we’ll need from it. Then, we define an async function to store our test code. In it, we create a new driver for Chrome. After creating the driver, we use it to go to our app’s URL.

Then, we interact with three elements on the page:

  • add the text “Typo in README file” to the input for the issue description
  • add “Project Maintainer” to the input for the assignee
  • click the button

It’s now time to run our file. Go back to our terminal and run node nowait.js. If everything went right, you should see a Chrome window opening and a new issue being created automatically:

Delete the issue that was created and close the Ch

Delete the issue that was created and close the Chrome window.

Well, that was interesting, but it didn’t really test anything. For instance, we could check whether the new issue is listed with the status “Open.” Let’s do just that by adding the following line to our test() function:


1 await driver . findElement ( By . className ( “label-info” ) ) . getText ( ) . then ( x => console . log ( x ) ) ;

The line uses the driver to find the element which has the class “label-info,” which is the label containing the issue status. Let’s attempt to retrieve the element’s text and log it to the console. Will that work? Let’s find out by running node nowait.js again.

After running that, you should see a lengthy error message. Here’s the really key part:

1 NoSuchElementError : no such element : Unable to locate element : { “method” : “css selector” , “selector” : “.label-info” }

Selenium isn’t able to find the status label, which is no surprise at all since it’s added to the page a few seconds after we click on the button. This looks like a job for WebDriverWait!

Testing With Implicit Wait

Fortunately, we can easily resolve the error by adding an implicit wait to the code. Add the following line of code immediately before accessing the app’s URL:


1 await  driver . manage ( ) . setTimeouts (  {  implicit :  5000  }  ) ;

Here, we define a timeout of five seconds. Considering we added an artificial loading period of just three seconds to our app, things should work as expected now. Rerun the app, and now you should see “Open” being printed to your terminal.

Testing With Explicit Wait

For the explicit wait, we’re going to use the until element located condition. First, let’s add the function to our list of imports as the first line of the file:


1 const  { Builder ,  By ,  until }  = require ( “selenium-webdriver” ) ;

Then, as the last line in the test() function, add the following line:

JavaScript await driver.wait(until.elementLocated(By.className(“label-info”))).then(el => el.getText().then(x => console.log(x))); 1 await  driver . wait ( until . elementLocated ( By . className ( “label-info” ) ) ) . then ( el  =>  el . getText ( ) . then ( x  =>  console . log ( x ) ) ) ; Here, we’re instructing WebDriver to wait until the element with the desired class name is located. Only then will we proceed to extract and log its text. Testing With Fluent Wait Finally, let’s see an example of testing using fluent waits. This last example will only require a small change to the line you used in the previous example. Replace the following line: await driver.wait(until.elementLocated(By.className(“label-info”))).then(el => el.getText().then(x => console.log(x))); 1 await  driver . wait ( until . elementLocated ( By . className ( “label-info” ) ) ) . then ( el  =>  el . getText ( ) . then ( x  =>  console . log ( x ) ) ) ; with this one: JavaScript await driver.wait(until.elementLocated(By.className(“label-info”)), 20000, ‘Timed out after 20 seconds’, 4000).then(el => el.getText().then(x => console.log(x))); 1 await driver . wait ( until . elementLocated ( By . className ( “label-info” ) ) , 20000 , ‘Timed out after 20 seconds’ , 4000 ) . then ( el => el . getText ( ) . then ( x => console . log ( x ) ) ) ; As you can see, we continue to wait until the element is located; however, this time we pass three additional parameters to the elementLocated method: A timeout. In this case, we’re waiting 20 seconds (or 20000 miliseconds) before giving up The message for the timeout error. A value indicating how often we should poll for the element (we’re saying Selenium should try again every 4 seconds.) That means that our code will poll for the object 5 times before timing out. Let’s run it. If you run the test again, you’ll see “Open” being displayed on the console. Now, let’s cause the element to not be found. Change the code so the class name is invalid, like this: JavaScript await driver.wait(until.elementLocated(By.className(“sdfsdfsdf”)), 20000, ‘Timed out after 20 seconds’, 4000).then(el => el.getText().then(x => console.log(x))); 1 await driver . wait ( until . elementLocated ( By . className ( “sdfsdfsdf” ) ) , 20000 , ‘Timed out after 20 seconds’ , 4000 ) . then ( el => el . getText ( ) . then ( x => console . log ( x ) ) ) ; Then, execute the file again. Now, you’ll see the message “Timed out after 20 seconds” being displayed.

Your Answer

Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy