15 comments

  • Hi vishvas,

    Your idea is good and you have written program very well but if we have some mechanism for password getting it from some file and get it encrypted in the code that would be good rather than simply giving directly the password in the code. becoz third person can see the password directly..

    This is just my view point I think if the password encryption is also done then its really perfect…

    • Hi RamKrishna,

      Thanks for your valuabel feedback.

      This was actually done intentially, Yes it would be a great idea to have encryption OR having credential in some other file.

      Scenarios was keeping in mind that If any one wants to modify the same for OUTLOOK or some Other Email account, He/she can easily configured the same.

      Morover, If some one has BDD or Managemnt level test case just like below, he/she can easily used it as :-
      Check gmail account for Email Recived:
      # Check Gmail for Verification with User “[email protected]” and password “p488w0rd” : Here can make the calling of account whichever feasible for the user
      #Search for subjectKeyword “New User registered” fromEmail “[email protected]” bodySearchText “You have successfully register ”

      Hope, this will help you guys. Thanks..!!

      –Vishwas

  • Great Work Vishwas. Very Well Explained!!

    I just had a few questions. Will the same code work for Outlook?
    I have a scenario where i upload a file on the application and as soon as the file is uploaded, the uploader receives an email into outlook.
    So it is possible to test the same with the above code?

    Also i wanted to know if Javax API free?

    Regards,
    Shruti

  • Pingback: Gmail login using selenium webdriver - Gmail - Official Login

  • Karabasappa patil

    Thank you

  • Karabasappa Talawar

    My account sharsh

  • Karabasappa Talawar

    Great Work Vishwas. Very Well Explained!!

    I just had a few questions. Will the same code work for Outlook?
    I have a scenario where i upload a file on the application and as soon as the file is uploaded, the uploader receives an email into outlook.
    So it is possible to test the same with the above code?

    Also i wanted to know if Javax API free?

    Regards,

  • Hello,

    DO Javax api and java mail both are diffrent are same,

    I have used the same code as above and I ma getting the message as invalid credentials though I have given valid credentials.

  • Could you please guide anybody what are the jars I need to be imported. and preconfigurations required.

  • Rodrigo González

    Hi Vishwas:

    I’m trying to extract a specific text received from an Email sent after ending a flow. I need to fetch a code sent by Email to my Gmail account, but I’m not able to reach the xpath:

    87884
    The error is the next:

    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {“method”:”xpath”,”selector”:”//*[@id=”:13s”]/div[1]/div[2]/div[1]/div[1]/div[6]”}

    I can’t reach the element with xpath, id… No way!!!

    Could you please help me?

  • Kratarth gupta

    What Part p in the getText method ?

  • Pingback: Email verification from gmail account in selenium webdriver (JAVA) - JavaTechji

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.