Silenium Click on a Mailinator Mail

1,105 views
Skip to first unread message

Etaliken

unread,
Oct 19, 2014, 8:35:56 AM10/19/14
to seleniu...@googlegroups.com
Hello,

im using C# and want to Click the e-mail on:

can anyone help me?

Thanks :)

Madan Singh

unread,
Oct 20, 2014, 7:31:37 AM10/20/14
to seleniu...@googlegroups.com
Hi,


            driver.Navigate().GoToUrl(emailBox);

but I want to make a note if you will use mailinator in large scale with automation, they will restrict to you.



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/397fdbf0-7ea0-4085-9f90-8d9652b6e9b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
M P Singh
9971360313

Etaliken

unread,
Oct 20, 2014, 11:51:56 AM10/20/14
to seleniu...@googlegroups.com
Hi, 

sry my question was not precise.
I can navigate to the page and click on the first link. But now i have to click on a link in the mail. Here's the sourceocde:

<div class="mailview" style="margin-right:18px;">
            Hallo Benedikt, <br><br>

bitte klicken Sie auf den untenstehenden Link, um die E-Mail-Adresse Ihres Battle.net-Accounts zu bestätigen:
<br>
 
<a href="https://eu.battle.net/account/email/confirm.xml?ticket=1v18LvamIWsf41sgz9%2F%2Bva9do0UOtAxSRXoT8q4CWW10eP1yw%2BDTnw7777aQFDCI%2B%2F1ZCzf%2Bh48XbWCa1e47hcPb2uFEJoHoCjlD3MTqbi95pfJlUMq3tPk6OFIp6BNK&amp;style=lobby&amp;ST=EU-b47a6c4e440cb7a259a57cc4017f1e13&amp;info">https://eu.battle.net/account/email/confirm.xml?ticket=1v18LvamIWsf41sgz9%2F%2Bva9do0UOtAxSRXoT8q4CWW10eP1yw%2BDTnw7777aQFDCI%2B%2F1ZCzf%2Bh48XbWCa1e47hcPb2uFEJoHoCjlD3MTqbi95pfJlUMq3tPk6OFIp6BNK&amp;style=lobby&amp;ST=EU-b47a6c4e440cb7a259a57cc4017f1e13&amp;info</a><br><br>

Durch die Bestätigung Ihrer E-Mail haben Sie Zugang zu gesonderten Optionen Ihres Battle.net-Accounts, die eine Bestätigung erfordern. Insbesondere können Sie Ihre Spiele online registrieren und anschließend auf Ihrem Computer herunterladen. Sie finden diese Option in der ‘Spiele’-Sektion Ihres Battle.net-Accounts, nachdem Sie Ihre E-Mail-Adresse bestätigt haben.
<br><br>



Sollten Sie Fragen zu Ihrem Battle.net-Account haben, kontaktieren Sie bitte unseren <a href="http://eu.blizzard.com/support/article.xml?articleId=28570">Rechnungssupport</a>.
<br><br>

Mit freundlichen Grüßen<br>
Das Battle.net-Account-Team<br><br>


<a href="http://eu.blizzard.com/de-de/company/about/privacy.html">Datenschutzrichtlinien</a>

</div>











I already tried this:

driver.FindElementByCssSelector("#mailcontainer > li > a > div.from.ng-binding").Click();

and

driver.FindElement(By.CssSelector("a[href*='confirm.xml?']")).Click();

Both did not work.
Thanks.

PeterJeffreyGale

unread,
Oct 20, 2014, 12:08:56 PM10/20/14
to seleniu...@googlegroups.com
I don't do much with css selectors myself, but

> ... "#mailcontainer > li > a > div.from.ng-binding" ...

here I can't see why you are trying to click on a div within the <a> element ... I can't see that there are any <div>'s below the <a>.


> ... a[href*='confirm.xml?']

Assuming the "*" and "?" act as standard wildcard operators, shouldn't the "*" immediately prefix the "confirm.xml"?
And if the "?" represents a match on any single character it will not match the full long string in your href.

Personally I would use the XPath expression "//a[1]" to find the first link, but I guess you could use css of:


  #mailcontainer >> a >




Message has been deleted
Message has been deleted

Etaliken

unread,
Oct 20, 2014, 12:41:26 PM10/20/14
to seleniu...@googlegroups.com
Hey, i tryed:
driver.FindElementByXPath("//a[1]").Click(); and went to mailinator itself
with
driver.FindElementByXPath("//a[2]").Click(); i go to: http://tristanbrotherton.com/

driver.FindElementByXPath("//a[3]").Click(); does not exist. Error

Here's the page with the link:

Then Click on the First E-mail and then i want to click on the ref link to validate the account.

can you have a look? I hope mailinator did not delete it in that time.

Thank you :)

Etaliken

unread,
Oct 20, 2014, 1:55:20 PM10/20/14
to seleniu...@googlegroups.com

Krishnan Mahadevan

unread,
Oct 20, 2014, 2:05:50 PM10/20/14
to Selenium Users

When that site provides API s why are you trying to read mails via UI ?

http://mailinator.com/apidocs.jsp

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Madan Singh

unread,
Oct 21, 2014, 12:25:09 AM10/21/14
to seleniu...@googlegroups.com
Hi
just  use the below line of code, 

driver.FindElement(By.XPath("//ul[@id='mailcontainer']/li[1]/a/div[2]")).Click();

it will open the first mail of you inbox.




For more options, visit https://groups.google.com/d/optout.

Preeti Mishra

unread,
Apr 2, 2019, 8:44:26 AM4/2/19
to Selenium Users
Hello, 

I wish to click on "Click Here" link after getting into confirmation email.

Please help

On Tuesday, October 21, 2014 at 9:55:09 AM UTC+5:30, Madan Singh wrote:
Hi
just  use the below line of code, 

driver.FindElement(By.XPath("//ul[@id='mailcontainer']/li[1]/a/div[2]")).Click();

it will open the first mail of you inbox.


On Mon, Oct 20, 2014 at 11:35 PM, Krishnan Mahadevan <krishnan.m...@gmail.com> wrote:

When that site provides API s why are you trying to read mails via UI ?

http://mailinator.com/apidocs.jsp

On Oct 20, 2014 11:25 PM, "Etaliken" <etal...@gmail.com> wrote:
http://mailinator.com/inbox.jsp?to=Jimmy_Kirchner47722

Am Sonntag, 19. Oktober 2014 14:35:56 UTC+2 schrieb Etaliken:
Hello,

im using C# and want to Click the e-mail on:

can anyone help me?

Thanks :)

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Preeti Mishra

unread,
Apr 2, 2019, 8:44:26 AM4/2/19
to Selenium Users
    driver.findElement(By.xpath("//td[contains(text(),'moments ago')]")).click();
This worked for me but i am not able to click on Click Here link

For click here I used this    driver.findElement(By.linkText("Click Here")).click();

Please help me


On Tuesday, October 21, 2014 at 9:55:09 AM UTC+5:30, Madan Singh wrote:
Hi
just  use the below line of code, 

driver.FindElement(By.XPath("//ul[@id='mailcontainer']/li[1]/a/div[2]")).Click();

it will open the first mail of you inbox.


On Mon, Oct 20, 2014 at 11:35 PM, Krishnan Mahadevan <krishnan.m...@gmail.com> wrote:

When that site provides API s why are you trying to read mails via UI ?

http://mailinator.com/apidocs.jsp

On Oct 20, 2014 11:25 PM, "Etaliken" <etal...@gmail.com> wrote:
http://mailinator.com/inbox.jsp?to=Jimmy_Kirchner47722

Am Sonntag, 19. Oktober 2014 14:35:56 UTC+2 schrieb Etaliken:
Hello,

im using C# and want to Click the e-mail on:

can anyone help me?

Thanks :)

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Aniket Mane

unread,
Apr 3, 2019, 11:51:29 AM4/3/19
to seleniu...@googlegroups.com
Hi Preeti,

If you have to do automation on email,then you should have api for that email or your organization should have private domain access of mailinator.

Thanks,
Aniket

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Murthy Muthyala

unread,
Feb 1, 2020, 4:22:54 AM2/1/20
to Selenium Users
Hi,
I am googling the solution. I am new to Selenium Automation.
I am trying to achieve the same.
- Enter the email in the email box field and click on Send email button.
- entered email address is stored in a String.
- Receives email to Mailinator's private inbox
- Have an api- token 
My requirement - 
search for the Mailinator inbox for the email using the above stored string value 
Once email is found then look for the href link and copy the link.
The problem here is there are many href links. have to find particular one .. in that tag where href link is.. at the end of the href link there is a wording called open account.

Can you please help me..
Thank you
Murthy

Reply all
Reply to author
Forward
0 new messages