Selenium | Dec 12 - Jan 10 (2020-21) | Harish Pandalangatt

Discussion in 'Web App and Programming' started by Nishant_Singh, Dec 12, 2020.

  1. Nishant_Singh

    Nishant_Singh Well-Known Member
    Staff Member Simplilearn Support

    Joined:
    Aug 1, 2018
    Messages:
    359
    Likes Received:
    133
    #1
  2. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #2
  3. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hi Team,

    Sharing the notes text file which was discussed during our session.
     

    Attached Files:

    #3
    Haritha_18 likes this.
  4. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    I am new to Java and taking another class to help me understand it more. I already had Java 11 downloaded to my laptop (the other class requires Java 11). When I download Java 8 as you stated from Saturday 12/12 lecture, I can't even get Eclipse to open, so I uninstalled it. It will open with Java 11 and let me input the scripting you were showing us, but I get an error when I try to run it:
    Error: Could not find or load main class com.packageone.Demo1
    Caused by: java.lang.ClassNotFoundException: com.packageone.Demo1

    Also, next to the JRE System Library it shows [Javase-14]. My cmd prompt shows version 11 for Java.

    I don't know what I am doing wrong so I can practice Java in Eclipse.
     
    #4
  5. Haritha_18

    Haritha_18 Member

    Joined:
    Sep 22, 2020
    Messages:
    2
    Likes Received:
    0
    Hello,
    Where can I find the assignments which I need to submit during the weekdays?
     
    #5
  6. Rahul Ghosh_3

    Rahul Ghosh_3 Member

    Joined:
    Dec 8, 2020
    Messages:
    2
    Likes Received:
    0
    Harish, I cannot find the assignment. All your notes that you gave to us for all the lessons for two days I cannot find them. All your video that you mentioned is not there. Can you please clarify and give us the location. Please post everything on the Simplilearn web site and not not on google drive. Thank you Rahul
     
    #6
  7. Pratiksha_19

    Pratiksha_19 Customer
    Customer

    Joined:
    Nov 24, 2020
    Messages:
    1
    Likes Received:
    0
    I installed the Selenium as per pdf. Which are the assignments that we need to do for practice, where can I find those?
     
    #7
  8. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hi Denetta, Please add Java to your path/environment variable in your machine. I have given the steps above. Hope that helps.
     
    #8
  9. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hi Pratishka,

    We are starting the selenium session from this week, I will share the assignments during this weekend once I complete the topic.
     
    #9
  10. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hi Rahul,

    As TA mentioned in our session, the recorded videos are yet to be processed to be shared with the team. The notes are shared in the google drive link which I have given in chat during session. Anyways sharing the google link below.

    https://drive.google.com/drive/folders/1_W0TQ6V4DLCNKcVLs78gYqdUVwGc_Bli

    The slides showcased will be under your LMS - Couse Resources. Hope this helps.
     
    #10
  11. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hello Haritha,

    For the Java Assignment I have already showcased the location during our class. Anyways sharing the Assignment file with this comment for your reference.

    We will be starting with selenium content from this week.
     

    Attached Files:

    #11
  12. Dileep Kumar Mukundan

    Customer

    Joined:
    May 12, 2020
    Messages:
    2
    Likes Received:
    2
    first i installed java 1.8 from https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
    then i used this link to download eclipse which contain required java packages for eclipse. - https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-12/R/eclipse-inst-jre-win64.exe

    hope this helps.
     
    #12
    harishp1906 likes this.
  13. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #13
  14. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    I removed Eclipse and then re-downloaded Java 1.8.0 and tried to change the environment variable per the above instructions. Now I get an error "Version 1.8.0_271 of the JVM is not suitable for this product. Version: 11 or greater is required". I still can't use Eclipse.
     
    #14
    harishp1906 likes this.
  15. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    DISREGARD - I have figured it out and it is working now. Thank you for your help
     
    #15
    harishp1906 likes this.
  16. Rahul Ghosh_3

    Rahul Ghosh_3 Member

    Joined:
    Dec 8, 2020
    Messages:
    2
    Likes Received:
    0
    Hi Harish, Can you ask the TA to mark me present for today''s class (December 20, 2020) so that it shows a check mark. I forgot to click Attend. Thanks Rahul Ghosh
    upload_2020-12-20_19-50-22.png
     
    #16
  17. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hello!

    Sharing the Assignment showcased in our Class below. Once you have completed Upload the file into a Google drive and share your link in the forum.

    1)Create a Java project with TestNG
    2)Register an Account - http://automationpractice.com/index.php
    3)Sign Test case with Registered Account
    4)Keep Assertions on (Page Title, Text, URL)
    5)Search for a product and verify if you have navigated to correct page with search results Assertion

    Please share your issues here if you encounter any.

    Happy Coding!
     
    #17
  18. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #18
  19. Shwetha VR

    Shwetha VR Member

    Joined:
    Mar 13, 2020
    Messages:
    4
    Likes Received:
    4
    #19
    harishp1906 likes this.
  20. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    Because of my part time job I cannot attend every class but I will watch the recording. I just finished the Dec 19th session and I found it very helpful. I was able to follow along easily and understand the beginning of Selenium and Eclipse Java. How do I get credit on my portal for attending the class since I watched the recording? Is this possible?
     
    #20
  21. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    #21
  22. Shwetha VR

    Shwetha VR Member

    Joined:
    Mar 13, 2020
    Messages:
    4
    Likes Received:
    4
    Hi Denetta,

    You can upload the file in your google drive link. The drive is linked to your Gmail account. Then there is an option to share the link.

    Thanks,
    Shwetha VR
     
    #22
    Denetta Eager and harishp1906 like this.
  23. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #23
  24. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Hi Denetta,

    Please find the steps below:
    1. On your computer, go to drive.google.com in a browser once you login to Gmail
    2. At the top left, click New. File Upload or Folder Upload.
    3. Choose the file or folder you want to upload. (Make sure its is zipped)
    4. Also set the share settings to public such that I can view the file.
    Let us know if you face any challenges.
     
    #24
    Denetta Eager likes this.
  25. Swapna Sony

    Swapna Sony Customer
    Customer

    Joined:
    Nov 3, 2020
    Messages:
    7
    Likes Received:
    6
    Hi Harish, I tried both methods to configure TestNG. Finally settled to do it with help of Offline Jars. Below site was very helpful for me. Sharing here:
    3- Install TestNG in Eclipse IDE via offline Jar files.

    https://www.techbeamers.com/install-testng-in-eclipse-ide/#method3
     
    #25
    harishp1906 likes this.
  26. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    I was practicing on the Automation Practice webpabe, by trying to login with a user name and password. I was able to get the webpage to open, type in the user name and password, but I cannot get my code to click the Sign In button. I want to be sure I get the error that I entered in the wrong information since I don't have an account setup. Here is the link to my doc with the screen shot of my code. What am I doing wrong?
    https://drive.google.com/file/d/1ggz8BVdBWC5zZzMnQSmQGKd2yJ4MpOIs/view?usp=sharing
     
    #26
  27. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    Thank you both, I believe I was able to make this work.
     
    #27
    harishp1906 likes this.
  28. Shubham Pandey_8

    Shubham Pandey_8 Customer
    Customer

    Joined:
    Oct 9, 2020
    Messages:
    1
    Likes Received:
    1
    #28
    harishp1906 likes this.
  29. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11

    DISREGARD - I figured it out, I had to create the xpath.
     
    #29
    harishp1906 likes this.
  30. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    #30
    harishp1906 likes this.
  31. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    #31
    harishp1906 likes this.
  32. Andriy Migira

    Andriy Migira Member

    Joined:
    Oct 12, 2020
    Messages:
    2
    Likes Received:
    2
  33. SAUMYA C V

    SAUMYA C V Member

    Joined:
    Dec 10, 2020
    Messages:
    2
    Likes Received:
    1

    Hi Harish,
    Please find google drive link given below , which contains the Selenium Assignment(December 20- 2020) . Registration to account was done manually. Please go through the attached assignment and let me know in case of any issues.

    https://drive.google.com/file/d/13LeVPcnyaoy89Nd4tVfu25hworp9GOtN/view?usp=sharing
     
    #33
    harishp1906 likes this.
  34. Swapna Sony

    Swapna Sony Customer
    Customer

    Joined:
    Nov 3, 2020
    Messages:
    7
    Likes Received:
    6
    Hello This is Swapna Sony. I am getting one error in console while running TEST case in TESTNG, eclipse neon.

    org.testng.TestNGException:
    Cannot find class in classpath: AdvanceElements.HandlingKeyboards
     

    Attached Files:

    #34
    harishp1906 likes this.
  35. Swapna Sony

    Swapna Sony Customer
    Customer

    Joined:
    Nov 3, 2020
    Messages:
    7
    Likes Received:
    6

    Resolved this with a little search online, removed the error libraries and refreshed the project. Worked fine!!!
     
    #35
    harishp1906 likes this.
  36. Kavitha Mani

    Kavitha Mani Member

    Joined:
    Nov 27, 2020
    Messages:
    3
    Likes Received:
    1
    Hi,
    I saw the recordings of today jan 9th, I could not see anything not even sound or UI. Its just there for 5 hours.
    Can you please check the recordings and re-upload the correct one.Also i was trying to join the session yesterday jan 9th but could not see the sessions being opened.
    Can you check if there is any blockage for me.
     
    #36
    Denetta Eager likes this.
  37. _70499

    _70499 New Member

    Joined:
    Dec 18, 2019
    Messages:
    1
    Likes Received:
    1
    #37
    harishp1906 likes this.
  38. Swapna Sony

    Swapna Sony Customer
    Customer

    Joined:
    Nov 3, 2020
    Messages:
    7
    Likes Received:
    6
    Hello Harish,

    You mentioned to upload the code for ExtentReport. Awaiting this. Thanks!
     
    #38
    harishp1906 likes this.
  39. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11
    I need the recording from Jan 9th to complete this week's assignment, there are some parts I need to revist and understand better. Do you know when that recording will be posted? The one posted is the webex that didn't work, so it's 5 1/2 hours of silence. The true session isn't posted.
     
    #39
  40. Andriy Migira

    Andriy Migira Member

    Joined:
    Oct 12, 2020
    Messages:
    2
    Likes Received:
    2
    #40
    harishp1906 likes this.
  41. Dileep Kumar Mukundan

    Customer

    Joined:
    May 12, 2020
    Messages:
    2
    Likes Received:
    2
    Here is my code for registration

    package com.rediff;

    import java.util.concurrent.TimeUnit;

    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.chrome.ChromeDriver;
    import org.testng.annotations.Test;

    public class AutomationPractice {

    @Test

    public static void main(String args[]) {
    System.setProperty("webdriver.chrome.driver", "./BrowserUtil/chromedriver.exe");
    WebDriver driver=new ChromeDriver();
    driver.manage().window().maximize();
    driver.get("http://automationpractice.com/index.php");

    //click on Sign in link
    driver.findElement(By.linkText("Sign in")).click();

    //enter email id and click on create account button
    driver.findElement(By.xpath("//input[@id='email_create']")).sendKeys("myid@gmail.com");
    driver.findElement(By.xpath("//span[normalize-space()='Create an account']")).click();

    //enter the registration details and press register button

    driver.manage().timeouts().implicitlyWait(30000, TimeUnit.MILLISECONDS);

    WebElement radiomale = driver.findElement(By.id("uniform-id_gender1"));
    radiomale.click();
    driver.findElement(By.id("customer_firstname")).sendKeys("Dileep");
    driver.findElement(By.id("customer_lastname")).sendKeys("Kumar");
    driver.findElement(By.id("passwd")).sendKeys("QAZWSXEDC#1234");
    driver.findElement(By.name("days")).sendKeys("12");
    driver.findElement(By.name("months")).sendKeys("December");
    driver.findElement(By.name("years")).sendKeys("1974");
    driver.findElement(By.id("company")).sendKeys("MAFIL");
    driver.findElement(By.id("address1")).sendKeys("My Home, my place - 6890");
    driver.findElement(By.id("city")).sendKeys("My City");
    driver.findElement(By.id("id_state")).sendKeys("Alabama");
    driver.findElement(By.id("postcode")).sendKeys("682305");
    driver.findElement(By.id("id_country")).sendKeys("India");
    driver.findElement(By.id("phone_mobile")).sendKeys("9999999999");
    driver.findElement(By.id("phone")).sendKeys("9999999999");
    driver.findElement(By.id("alias")).sendKeys("my address");

    driver.findElement(By.xpath("//span[normalize-space()='Register']")).click();

    //driver.close();
    }

    }
     
    #41
    harishp1906 likes this.
  42. Haritha_18

    Haritha_18 Member

    Joined:
    Sep 22, 2020
    Messages:
    2
    Likes Received:
    0
    Hello Harish!

    Download Recordings for JAN09 session is available, but it is empty. It is showing only 137KB. Would you please take a look at it.

    Thanks,
    Haritha
     
    #42
  43. Shwetha VR

    Shwetha VR Member

    Joined:
    Mar 13, 2020
    Messages:
    4
    Likes Received:
    4
    #43
    harishp1906 likes this.
  44. Denetta Eager

    Denetta Eager Active Member

    Joined:
    Dec 10, 2020
    Messages:
    19
    Likes Received:
    11

    Here are the links to my Jan 10 assignment. I cannot get the correct xpath written so "Undergraduate" and "School of Dental Medicine" are clicked. I keep getting errors. Please provide feedback.
    https://drive.google.com/file/d/1KmzYJp0B2MUAbwqA5PzeWlPZ-WmcRH74/view?usp=sharing
    https://drive.google.com/file/d/1XvLrL8H7HvgJp82LbrZXO6fdx0M99mAu/view?usp=sharing
     
    #44
    harishp1906 likes this.
  45. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #45
  46. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #46
  47. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Good and Neat, try passing dynamic values for registration.
     
    #47
  48. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    #48
  49. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Good and Neat, Great to see you have Assertions in your checks
     
    #49
  50. harishp1906

    harishp1906 Active Member

    Joined:
    Dec 1, 2020
    Messages:
    27
    Likes Received:
    7
    Denetta - You can use xpath axes method to achieve this. Like getting the text to find the element uniquely.

    Ex: //tagname[text()='Undergraduate']
     
    #50

Share This Page