Gmail opens a new "compose mail" tab when typing into the mail field?!

Hello everyone,

I’m having an issue trying to automate an e-mail writing process using basic click and type into activities (not preferred, but I unfortunately can’t use the mail activities for now). The robot types into the recipient, subject, and mail fields like it’s supposed to, but after the first sentence or so in the mail field, it suddenly opens a new tab in Gmail called “compose mail” that’s blank and starts typing the rest of the email into the recipient field there. I’ve tried googling this issue but couldn’t find any info, can anyone please help?

Thanks so much in advance
BintaS

1 Like

@BintaS,

I hope you are passing some hot keys in between the sentences or you are trying to send multiple emails in the for loop.

Use delay process before sending the first mail and typing the second mail…

Hey there,

thanks for your response! I’m not using a for loop, just primitively clicking into the fields for one e-mail and typing a normal mail text in there. I first tried using a string variable for that, then just pasted the string into the Type Into activity + used the Environment.NewLine. Nothing is working, and I don’t understand why it opens a new tab/mail while typing one single continuous string in there! :slightly_frowning_face:

@HareeshMR or do you mean just wildly using tons of Type Into and Send Hotkey activities for each line of the message?

Just pass the string. No need of tab keys or any hot keys along with the string or in the middle.
Pass the string as it is. Hope that will resolve your issue…

@HareeshMR yeah that’s what I did in the beginning, and I mean, the bot starts typing exactly like it is in the string, but then it somehow opens that new tab… :sleepy:

Can you attach the workflow if possible?

@HareeshMR Here’s a simplified version of just the e-mail part :slight_smile: Gmail.xaml (21.4 KB)

Buddy i think the issue is with Environment.Newline
Kindly remove that and in type into Activity mention the string to be passed as message not environment.newline
The reason is it creates a new tab whenever environment.newline is met
Cheers @BintaS

That is working fine with me @BintaS after changing some selectors. I don’t get any new tab . Make sure to pass just the string without any new line characters and hot keys along with the string

Hey @HareeshMR how did you change the selectors? I just noticed that what happens is it types the first half of the sentence or so, then sends the mail (??), then continues typing in that new window that opens. I’m so confused, especially since I can’t figure out how I would elicit this kind of behaviour from Gmail myself…

Hey @Palaniyappan I’m not using any more NewLine commands, but I’m still encountering the same problem, so it apparently wasn’t that. :dizzy_face:

I modified some of the selectors and it is working fine for me.
However, after modifying selectors, I also faced the same issue - that the bot types half of the sentence and then clicks send. I was using Environment.NewLine. I used enter hotkey and it worked fine.

@VinitaD Hey there, could you please tell me what selectors you modified and how? I thought maybe pressing enter for the new line as it has to in the string sends the mail, but that technically doesn’t make sense since that’s not really how it works in Gmail… :pensive:

I have attached the workflow - GmailSendingANewMail.xaml (10.6 KB).
You don’t have to press enter in the string, you have to type [k(enter)] where you want a new line. E.g. “Hello Vinita[k(enter)]It was nice working with you[k(enter)]Thank you”

1 Like

@VinitaD Hey, I’ve tried exactly that before, and it still comes out to the same issue.

I have modified your workflow, so maybe the flow looks same to you but the selectors are different. Also, you used click image activities for clicking on ‘Compose’ and ‘Send’, where as I have used click activities.
Just try with this new workflow and see if it works.

1 Like

Hey, I just found the problem by using a key logger to see what happened in the background. It doesn’t have anything to do with the selectors; it’s that Gmail “types” the ctrl key twice to save a draft, then UiPath types enter and that combo (ctrl+ctrl+enter) sends an email instantly. So I just set the timer to wait 2 seconds before typing and used [k(enter)] instead of the normal line breaks in the string, and now it works. :grin:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.