You made my concepts so easy. on UDemy when i was studying one course that was so lengthy (Rahul arora) here i can see you made it so easy for me.Thanks a lot
Hi Raghav, Stupendously explained without leaving a trace of doubt m learning automation thro ur videos as m migrating from manual testing, i have small doubt i heard from ma peers that industry now a days uses hybrid framework so if possible could you plz thro some light on what that exactly it is . . Thanks hell a lot n wish you many more success:-)
Hi Macques, There are diff types of frameworks based on the design approach. Most common are Keyword, Data-Driven and Hybrid. Keyword framework has functionalities coded into keywords. for example login functionality will be written in a function say login and will be exposed using keyword login. So whenever the user calls this keyword, it will run the login function and do login on the application. In Data-Driven, its the data that drives automation, So we have test data stored separately and we can add, delete update data w/o changing the framework. Based on our data the test runs accordingly. Hybrid is a mix of both approaches and is more popular and widely used. Here we have keywords for functionalities and action and also use external data.
Hi Raghav, I follow your tutorials, you explanations are really helpful. Please enhance the audio quality of the videos, it is very very low. I was watching testNG listeners video but I had to quit due to the poor audio quality. Please do something.
Hi Ragav, with respect to (18 min 15 sec ) in the video. I have seen that you have used static webelement . will it work for parallel execution ??? during parallel , it kind of conflict right ?
Hi, yes after going through these courses with practical hands-on you can start applying. I will suggest that you keep on doing hands-on and also keep on adding new skills. Will get all my courses here automationstepbystep.com/online-courses/
Hi Raghav, thank you so much for this video and others in this series. I have a doubt, why did you have WebDriver reference to be static and why did you have the method defined as static in lines 12, 19 at 13:55. Please let me know.
@@RaghavPal Thanks for the reply Raghav. I kind of guessed that, but was having a different Question related. If we have a Baseclass of a test set that we configure our webdriver reference in, and we use this webdriver reference in other test classes of the set where we extend the base class and hence the driver is available to all the test classes as well and we do not need to create the object for that webdriver reference in other test classes too. So is there any advantage of having static specified to the Webdriver object as we don't need to create an Object of it in child classes?
First of all, thank you very much for creating these videos Raghav sir. I just have one concern about Flow-based testing with the POM framework. For example, we have created the Page Objects method for Sign up, log in, Browse Items Page, Check out page, payment page and etc. Now I would like to execute the entire flow as one group. How can we achieve this using Page Object Modal? I have been looking for the answer for quite a while. I am confident that you will be able to help me with it. Thank you in advance Raghav Sir
I am a little confused. In this example there is only one web element for text box. What about when there are more text boxes. Do I need separate functions for each textbox element?
Hi Ranjith, I do not recall and will have to watch the video again. It may be done in the previous one, Hope you have watched all the earlier sessions on this playlist
I confused between the full form of POM. Is it Project Object Model or Page Object Model, because you referred it project object model in previous session of pom.xml
Hi Raghav thankx for the session , a small request from my end can u provide me a properly working POM project as i want to implement in my project can u send me or provide me the file .
Hi Binay, will depend on what server and what exactly you are looking to test. You might want to look into ETL for DB testing. Also check this www.softwaretestinghelp.com/how-to-perform-backend-testing/
Hi Raghav , i have done the same and below is my code package test; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import pages.GoogleSearchPage; public class GoogleSearch { private static WebDriver driver = null; public static void main(String[] args) throws InterruptedException { googleSearch(); } public static void googleSearch() throws InterruptedException{ driver = new ChromeDriver();
//goto google.com driver.get("google.com");
//enter text in search text box //driver.findElement(By.name("q")).sendKeys("book my show"); GoogleSearchPage.textbox_search(driver).sendKeys("Automation Step by Step");
Thread.sleep(5000);
//click on search button //driver.findElement(By.name("btnk")).click(); //driver.findElement(By.name("btnk")).sendKeys(Keys.RETURN); GoogleSearchPage.button_search(driver).sendKeys(Keys.RETURN);
driver.close();
System.out.println("Test Completed");
} } error: Starting ChromeDriver 2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91) on port 20487 Only local connections are allowed. Jan 18, 2019 11:40:17 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"name","selector":"btnk"} (Session info: chrome=71.0.3578.98) (Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds For documentation on this error, please visit: www.seleniumhq.org/exceptions/no_such_element.html Can you please help after google page gets open and Automation step by step Text is entered in the search box i am unable to perform the return operation please help me out
Hi Nikhildache, I see you have already commented the line where you are hitting the button btnK. Usually it happens as when you write something on the search box, an auto-suggestion drop-down appears and overlaps over the search button. and search button becomes invisible. So after entering text you can either press ESC key to close auto-suggestion and then click btnK or directly hit ENTER key and skip btnk click
can email at raghav.qna@gmail.com, but replies to emails are delayed, You can get faster response here. Can check tutorials here - automationstepbystep.com/
Harshada The `org.openqa.selenium.NoSuchElementException` error in Selenium typically occurs when the script is unable to locate the element you are trying to interact with. Here are a few common reasons and solutions for this issue: 1. Element Not Present: The element might not be present in the DOM at the time the script is trying to interact with it. You can use `WebDriverWait` to wait until the element is present. ```java WebDriverWait wait = new WebDriverWait(driver, 10); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("yourButtonId"))); element.click(); ``` 2. Incorrect Locator: Ensure that the locator you are using is correct. Double-check the element's ID, class, name, or other attributes. ```java WebElement element = driver.findElement(By.id("yourButtonId")); element.click(); ``` 3. Element in iFrame: If the element is inside an , you need to switch to the first. ```java driver.switchTo().frame("frameName"); WebElement element = driver.findElement(By.id("yourButtonId")); element.click(); driver.switchTo().defaultContent(); ``` 4. Dynamic Elements: If the element's attributes change dynamically, you might need to use a more robust locator strategy, such as XPath. ```java WebElement element = driver.findElement(By.xpath("//button[text()='Click Me']")); element.click(); ``` 5. Page Load Issues: Ensure the page has fully loaded before attempting to interact with elements. ```java driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); ``` If you continue to face issues, wrapping your code in a try-catch block can help handle exceptions gracefully --
@@RaghavPal yes, when we enter the text inside google search box ,it pops up with auto suggestions due to which the search button gets hidden ,for that I had also used keys.RETURN ,But still issue is persist
Very impressive. Excellent job. Clear and simple to the point. I wish I knew about your series before
Thank you very much!
You are good in explaining the concepts in a simple fashion with practical examples. Thanks for sharing your knowledge.
You are welcome Harsh
That is what I exactly looking for. Suddenly it shows, I always want to go with video, thank you for your effort. Video deserve like subscribe
You are welcome Sushma, thanks
Thank you very much, best selenium tutorials! You saved me thousands of manual work.
You're welcome
Its really so helpful to make my program more efficient and thank you again
Great to know this Kuldeep
You made my concepts so easy. on UDemy when i was studying one course that was so lengthy (Rahul arora) here i can see you made it so easy for me.Thanks a lot
Glad to know it helped Kavita
Thankyou so much because of you only my all doubts are cleared out. very nice explanation as name step by step.
Most welcome Anni
Thank you, I appreciate your support to learners like me, this video helped me a lot.
Glad to hear that!
This video in the series is the one that got me to like n subscribe. I have fallen in love with POM
So happy to know this Samuel
Excellent video, resolved all my queries w.r.t Page object model. Thanks!
Most welcome Suhas
nice I suddently understood the coding in Java basic is king!
Thanks for watching
16:50 love it!
thanks for watching
I am really enjoying all your video very detailed and easy to follow. Thank you Raghav .
You're welcome Laila
Thank you for making series on this.....
best explanation 👏 🙌
Most welcome Charushila
Extra Ordinary Explanation thank you so much😍👍
You are welcome 😊
Hi Raghav, Stupendously explained without leaving a trace of doubt m learning automation thro ur videos as m migrating from manual testing, i have small doubt i heard from ma peers that industry now a days uses hybrid framework so if possible could you plz thro some light on what that exactly it is . . Thanks hell a lot n wish you many more success:-)
Hi Macques, There are diff types of frameworks based on the design approach. Most common are Keyword, Data-Driven and Hybrid. Keyword framework has functionalities coded into keywords. for example login functionality will be written in a function say login and will be exposed using keyword login. So whenever the user calls this keyword, it will run the login function and do login on the application.
In Data-Driven, its the data that drives automation, So we have test data stored separately and we can add, delete update data w/o changing the framework. Based on our data the test runs accordingly.
Hybrid is a mix of both approaches and is more popular and widely used. Here we have keywords for functionalities and action and also use external data.
Wonderfully explained...thanks much Raghav
Amazing stuff you made automation very easy ,🙂
Thanks Aman
I got clarity on POM thanks a lot
Most welcome Sairam
Great step-by-step video! Cheers
Thanks for watching Anthony
Great video Raghav. Very helpful
You're welcome Paul
hey raghav thaks for making it so simple and i could learn it so easily.
You're welcome Sushanth
Thank you for this video. Your videos are very detailed and easy to follow.
Thanks Niraj
beautifully explained. Thanks Raghav.
You're welcome Darsana
explained clearly. thank you
Glad it was helpful Jayashree
Thank you very much, it is a really engaging experience to learn with you.
You're welcome Rose
I realize I'm quite off topic but do anybody know a good website to watch new series online ?
@Darwin Noah Lately I have been using Flixzone. Just google for it :)
@Angel Dominik Yea, have been using FlixZone for years myself :)
@Angel Dominik thank you, I signed up and it seems like a nice service =) Appreciate it!
Really u make it simple to understand 👍
Glad to hear that Arabinda
Hi Raghav,wonderful session.Thank you so much
Most welcome Karthik
Best Explanation!
Glad it was helpful Manish
thanx for sharing this video
You're welcome Shadab
Thanks helps in frameweork development
Most welcome Ashwini
Very well explained, thank you!!
Glad it was helpful!
Very nicely explained.
Thanks Vipin
Excellent
Thanks Amol
such a big tq very much sir
You are most welcome Yohan
Great explainaton
Thanks Rama
Thank you..useful info 🙏
Most welcome Vikas
Thank you sir 🙏🏻
Most welcome
Very useful video
Glad you liked it Sifar
Thank You Raghav !!
Most welcome Arjun
youre a beast bro thank you for your very easy lesson.currently updating my skills from uft and your videos flow very well.
So happy to see this Alan
Thank you so much for explaining in detail
You're welcome Anil
Hi Raghav, do you think I can implement similar POM concept on native iOS applications ?
Yes, you can Sai
Thank you so much
You're most welcome
great content, tysm
only please use dark mode in future videos
Noted Akash. will use for all my future slides
very good video!
Thanks Divyang
Raghav Pal, what would you recommend if I want to use a javascript method with POM?¨
Hi Frank, if you want to use javascript executor to handle some dynamic element, you can do that.
Hi Raghav, as per the best practice in selenium automation, which element locator should ideally be used and why?
You can go with either xpath with id or css, based on what is available
Nice
Thanks Pavan
Hi Raghav, I follow your tutorials, you explanations are really helpful. Please enhance the audio quality of the videos, it is very very low. I was watching testNG listeners video but I had to quit due to the poor audio quality. Please do something.
Sure Mimi, I will check on this. For now pls use headphones and make player volume to max
Hi Raghav, do you have to create a new chromedriver for each test case?
No Aidil, not needed and will not be efficient
Hi Ragav, with respect to (18 min 15 sec ) in the video. I have seen that you have used static webelement . will it work for parallel execution ??? during parallel , it kind of conflict right ?
Hi, yes, you can check on that. I did not try to run in parallel
when we want to run pom related packages we should mandatorly create the maven project in eclipse?
HI Shivu, yes
@@RaghavPal Thank you sir
Hi Raghav is this selenium course + your java course enough to apply for QA job? Thank you.
Hi, yes after going through these courses with practical hands-on you can start applying. I will suggest that you keep on doing hands-on and also keep on adding new skills. Will get all my courses here automationstepbystep.com/online-courses/
Thank u so much raghav
You're welcome Uma
thanks
You're welcome Snigdha
good explanation but since you used static for driver, this will cause problem when running on Grid for parallel execution
Hi Roshan, yes, I will explain more on this in Grid tutorial
Hi Raghav,
I wish you have created new Maven Project for Page Object Model Tutorial.
Hi Hamifar, can check this - ruclips.net/p/PLhW3qG5bs-L_8bwNnMHdJ1Wq5M0sUmpSH
Hi Raghav, thank you so much for this video and others in this series. I have a doubt, why did you have WebDriver reference to be static and why did you have the method defined as static in lines 12, 19 at 13:55. Please let me know.
Any advantages of using static over not using it in the framework?
Hi Anirudh, you can call static methods without creating objects first.
@@RaghavPal Thanks for the reply Raghav. I kind of guessed that, but was having a different Question related. If we have a Baseclass of a test set that we configure our webdriver reference in, and we use this webdriver reference in other test classes of the set where we extend the base class and hence the driver is available to all the test classes as well and we do not need to create the object for that webdriver reference in other test classes too. So is there any advantage of having static specified to the Webdriver object as we don't need to create an Object of it in child classes?
In general, when we create frameworks we need to use the same driver instance at diff places and for that its best to keep it static
@@RaghavPal OK thanks Raghav
First of all, thank you very much for creating these videos Raghav sir. I just have one concern about Flow-based testing with the POM framework. For example, we have created the Page Objects method for Sign up, log in, Browse Items Page, Check out page, payment page and etc. Now I would like to execute the entire flow as one group. How can we achieve this using Page Object Modal? I have been looking for the answer for quite a while. I am confident that you will be able to help me with it. Thank you in advance Raghav Sir
Hi Prashant, here we keep the objects and methods in specific page classes and to create a test or flow we can call the methods from required classes
Make sense. Thank you sir
You can easily write PageObjects in IntelliJ IDEA with plugin:
blog.jetbrains.com/idea/2020/03/intellij-idea-2020-1-selenium-support/
Thanks for the inputs Yuriy
Thanks soo much ,can you plz copy code and paste in description for revision.
Hi, YOu can get code from -. github.com/Raghav-Pal/SeleniumJavaFramework1
When I remove "public static void main" run as will not have Java Application.
You should have main function somewhere. Main is the starting point for a java compiler
Your right I figured it out before. At least I learned something new. Thanks again.
You still can run the code after removing main but you have to use testng for this , which is way better than main
I am a little confused. In this example there is only one web element for text box. What about when there are more text boxes. Do I need separate functions for each textbox element?
Hi Sailish, Basically we need to create a locator for every object we need to interact on the web page in POM.
Thank you. It was really helpful :)
Hi Raghav, Just wanted to ask if I can use extend keyword instead of importing the class ?
You will be doing inheritance. You can do.
Wouldn't it be nice if you create a new Maven Project for PageObjectModel for better undersating of your audience?
Sure, in new tutorials I will do it
Do we really need that ' default package' in that?
will check again Ashwin, have you tried
Hello, it 's possible to automate Oracle HCM with selenium java ?
Selenium can work only on browser
@@RaghavPal thank you,
Besides, I have another question.
do you do certifications in automation? I would like to have information about it.
Hi, I teach for corporates and groups. Can do certification programs if required and my schedule matches
Do you have any recent videos?
Can find all here - automationstepbystep.com/
hey, why have you created methods without void i.e. with return types..,, what is the benefit of this, how would it help
Hi Tanu, actually it all depends on your needs. In case you want to get some return, you can do that.
Why are you not using "By" class to store locators ?
Can do that, I might have explained that in some future videos
Hi , what could be the reason that something is working in Chrome but not in firefox
Hi, it can be due to speed, objects etc
Hi Please do a video for Page Factory Model. Thx in advance
Sure Udaya, will do it soon.
Thx man :)
Where are you defining as a Chrome Driver?
Hi Ranjith, I do not recall and will have to watch the video again. It may be done in the previous one, Hope you have watched all the earlier sessions on this playlist
@@RaghavPal Wow Raghav, I never expected you to reply back. I got it sorted. You are excellent. God Bless
sir what happened if i don't mention Webelement element as null. Only write Webelement element;
That should work as well Pabitra, pls try.
I confused between the full form of POM. Is it Project Object Model or Page Object Model, because you referred it project object model in previous session of pom.xml
its PAGE OBJECT MODEL
l+#$a easy.... we still have simple way of doing
thanks for watching
Hi Raghav thankx for the session , a small request from my end can u provide me a properly working POM project as i want to implement in my project can u send me or provide me the file .
Hi Sree, you can check this projects repo here github.com/Raghav-Pal/SeleniumJavaFramework1
Is there anyway to contact you sir ? I have got some doubhts
Hi Risna, can let me know here
unable to run program
showing erroe
Please send details and error message
Can i get this code?
Hi Haseeb, can find here github.com/Raghav-Pal/SeleniumJavaFramework1
Hi ragav can you share me Jbehave ... classes
Not yet created Purushotham
@@RaghavPal can i expect that course from your side
Yes, I will plan
:)
Hi Sir, How to do backend/server side applications testing
Hi Binay, will depend on what server and what exactly you are looking to test. You might want to look into ETL for DB testing. Also check this www.softwaretestinghelp.com/how-to-perform-backend-testing/
Hi Raghav ,
i have done the same and below is my code
package test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import pages.GoogleSearchPage;
public class GoogleSearch {
private static WebDriver driver = null;
public static void main(String[] args) throws InterruptedException {
googleSearch();
}
public static void googleSearch() throws InterruptedException{
driver = new ChromeDriver();
//goto google.com
driver.get("google.com");
//enter text in search text box
//driver.findElement(By.name("q")).sendKeys("book my show");
GoogleSearchPage.textbox_search(driver).sendKeys("Automation Step by Step");
Thread.sleep(5000);
//click on search button
//driver.findElement(By.name("btnk")).click();
//driver.findElement(By.name("btnk")).sendKeys(Keys.RETURN);
GoogleSearchPage.button_search(driver).sendKeys(Keys.RETURN);
driver.close();
System.out.println("Test Completed");
}
}
error:
Starting ChromeDriver 2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91) on port 20487
Only local connections are allowed.
Jan 18, 2019 11:40:17 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"name","selector":"btnk"}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: www.seleniumhq.org/exceptions/no_such_element.html
Can you please help
after google page gets open and Automation step by step Text is entered in the search box i am unable to perform the return operation
please help me out
and this is the elements i can see after inspecting the google search button
my chrome version is : Version 71.0.3578.98 (Official Build) (64-bit)
Hi Nikhildache, I see you have already commented the line where you are hitting the button btnK. Usually it happens as when you write something on the search box, an auto-suggestion drop-down appears and overlaps over the search button. and search button becomes invisible.
So after entering text you can either press ESC key to close auto-suggestion and then click btnK or directly hit ENTER key and skip btnk click
@@RaghavPal Hi Raghav thanks for the reply.
Bravo brilliant sir may I know your email I’d please
can email at raghav.qna@gmail.com, but replies to emails are delayed, You can get faster response here. Can check tutorials here - automationstepbystep.com/
Halau!
Vi are learning, viii viil see
I still continued ..watching ur video ....but now sure .....NOT GOOD AT ALL....
Hi Ashish, pls let me know where did you face issues
Hello sir ,For button click i am getting error such as org.openqa.selenium.NoSuchElementException:
Harshada
The `org.openqa.selenium.NoSuchElementException` error in Selenium typically occurs when the script is unable to locate the element you are trying to interact with. Here are a few common reasons and solutions for this issue:
1. Element Not Present: The element might not be present in the DOM at the time the script is trying to interact with it. You can use `WebDriverWait` to wait until the element is present.
```java
WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("yourButtonId")));
element.click();
```
2. Incorrect Locator: Ensure that the locator you are using is correct. Double-check the element's ID, class, name, or other attributes.
```java
WebElement element = driver.findElement(By.id("yourButtonId"));
element.click();
```
3. Element in iFrame: If the element is inside an , you need to switch to the first.
```java
driver.switchTo().frame("frameName");
WebElement element = driver.findElement(By.id("yourButtonId"));
element.click();
driver.switchTo().defaultContent();
```
4. Dynamic Elements: If the element's attributes change dynamically, you might need to use a more robust locator strategy, such as XPath.
```java
WebElement element = driver.findElement(By.xpath("//button[text()='Click Me']"));
element.click();
```
5. Page Load Issues: Ensure the page has fully loaded before attempting to interact with elements.
```java
driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
```
If you continue to face issues, wrapping your code in a try-catch block can help handle exceptions gracefully
--
@@RaghavPal yes, when we enter the text inside google search box ,it pops up with auto suggestions due to which the search button gets hidden ,for that I had also used keys.RETURN ,But still issue is persist
try using Escape key
Thanks
Welcome Shubham