Hi Mukesh , Thank you for your time which is helping us to understand easily.As you are educating us for free we should understand the passion you has for guiding us. Now a days nothing we get for free, so we can ask the clarifications in a polite way which will help so many like us in longer run.
Thankyou Sir, you have no idea how much these videos of yours is helping us as testers 👍 Great knowledge and information for newcomers. Please do take a little care of the volume, since it's not loud and clearly audible. Also if possible do upload new Selenium (imp topics) videos.
Thanks Apu for nice feedback. I have taken new mic for videos, so new videos have good voice. I have planned to make new videos on some important topic and will upload soon.
Hy.. You are doing good job for all testers thank you.. I need to perform Aws marketplace testing.. I don't know anything about it.. Can u please give some idea in short or share any link regarding it.. Thank u
Hi Mukesh, Hope you are doing good. Need your understanding on a scenario where in a web page there are multiple check boxes which need to be displayed on the console and the user has to select multiple options (say max 3). I am able to display the options but stuck on selecting multiple check boxes. Thanks.
Hi Mukesh , I am new to Selenium but have 10 years of experience in JAVA.Your tutorials are awesome.I wanted to switch from development to testing. In this tutorial , I have a doubt. Here while handling checkbox ,why we did not take By.getID("code") ? Instead we took xpath and looped around and compared with id ? Any specific reason for this ?
Hi Mukesh, We could have directly given xpath till the radio button/check box which we want to click. Why we are storing it in list and then click on it? Is this the standard way of coding?
Hi Aditi, Yes, you are correct we can give direct xpath and click. In above approach, you can pass data as well which will help you when you use the framework.
Hi..... Please help me.I spent an hour and could not get the text of the checkboxes. Instead of using the getAttribute, I wanted to get the actual text of the WebElement. Below is my Code: ( What I have retrieved from the below code is " CheckBox Elements are (nothing came up) ). List checkbox = driver.findElements(By.xpath("//input[@type='checkbox']")); for (WebElement text : checkbox) { String value = text.getText(); System.out.println("Checkox Elements are: " + value); }
Hi @Mukesh Sir, I am confused that if we can find the radio button simply by xapth (learned it from your tutorials by using indexes to get the exact location) then why do we need to write the for loop code.
Hi Mukesh, not able to get the inserted data. If I select the option, I am trying to read the selected attribute. In the Dom inside the div two different elements are there . One is for option and other one for label . How to achieve this.eg option &bsc MCA
Hi mukesh, As a tester wht would we chk here? We would check if each option is getting selected as an end user would like to select.for example... if i want to select both the options as an end user Java and Ruby then this program should allow that.If possible try n relate to hw testers are supposed to test real time.Thanks
Hi Mukesh, Y aren't we saying If(value.contentEquals("Ruby")) . Any specific reason? Because in your previous video, you showed as If(innerHtml.contentEquals("JavaScript"))
hi mukesh .. your videos are the best among all other videos uploaded on the you tube . I have copied all your data excel code for my slef..but since last night i am getting array bound of exception on one particular line : This particluar method on this particular line always gives me an error : public int getRowCount(int sheetIndex) { int rows=wb.getSheetAt(sheetIndex).getLastRowNum(); rows=rows+1; return rows; }
Dear Mukesh, in www.goibibo.com/flights/ site. the radio button elements does not have value attribute.so how to click action of particular radio button?
Hi Mukesh! Iam getting error in my eclipse regarding WebDriver driver =new ChromeDriver(); In both Webdriver and ChromeDriver,compiler is giving options to create classes of both.Why I am getting this? I am also getting error in By class in By.xpath as By cannot be resolved
As we have already selected the radiobutton as ruby in our first scenario. If we re-run the same scenario,it will fail. How we can validate that multiple radiobutton values are selected and deselected??
Hi mukesh.. nice video.. can u pls clear my doubt? i have to choose dynamically changing checkboxes which are written as list in the html code. when i tried your method with muliple 'if' stmnts to choose say checkboxes1,4,8 im getting 'STALE ELEMENT EXCEPTION' . Can you please helpme out..The application is amazon choosing more than one brands in the options.Thanks in advance.
Hi Mukesh, I am trying to click the radio button in facebook, when I write the following statement List radio = driver.findElement(By.id("u_0_6")); , it gives me Type Mismatch, cannot covert WebElement to List error. How to fix this. Thanks for helping.
Hi Mukesh. Thanks for your great Videos. Can you post a video on how to capture browser traffic using Selenium? I have seem few posts trying to use browsermob-proxy, but I couldn't get it to work. Thanks much!
I am trying to use the assert true function in POM to distinguish whether if my test has failed or pass but for some reason it keeps failing. I am not really sure if I am doing it the correct way. if you can give some info on how to use Assert function on POM?
Yes sure, so i have two packages one for locating the webpages and one for test cases. Codes the come from the webpages package: public boolean verifyResetPageText() { WebElement ver = Driver.findElement(By.xpath("html/body/div[1]/div/div/div/div[2]/div/p[1]")); return ver.getText().contains("Your password has been successfully reset."); } Testcase package holds this codes: WebPage_Forget_Password_Thankyou verify =PageFactory.initElements(Driver,WebPage_Forget_Password_Thankyou.class); Assert.assertTrue(verify.verifyResetPageText(),"failed"); Thanks a lot Mukesh.
Hi Mukesh just let you know i have fixed this problem. The issue was the browser kept closing before it reach to the XPATH but i have added implicit wait which has solved the problem. Thanks a lot man :)
Hi +Mukesh otwani I have question what if the attribute named value is not present and all other attributes are same How to handle that situation How Can we use JavaScriptExecutor here ?
Hi can you please tell me how to select a option in radio button....i am getting the output like yours but i need to select one those option......NEED HELP ASAP
FF 46 will work with Selenium 2 and if you using Selenium 3 then Gecko driver is must. Check out below post for more details learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/
Sir Mukesh otwani Why in this case ,it is pointing to null pointer exception?? Plz explain?? List checkbox=wd.findElements(By.xpath("//input[@type='checkbox' and name='lang']")); for(int j=0;j
How to select the checkbox by passing the checkbox name from excel (If i pass the check box text from excel sheet, then corresponding checkbox should be selected in the application)
Hi Rajendra you need to MAP this (excel with method) for example male yes female no based on mapping you can read true/false and use it accordingly in your code.
It would be good if you cn give the real time examples instead of using your own page..we can relate to that..Secondly whts the use of using findElements...what are we trying to achieve here..its not clear but explain it in a way that we can relate to real time examples...Rest the videos u make are very useful
Hi Harmeet, I am trying to explain here the logic about multiple/dynamic checkbox/radio button etc. If you understand the logic then u can implement in any application. The page which I created has the same scenario if you check other application like facebook, Gmail etc you will find the same scenario. At the end of the day its all HTML. In simple words, this is real scenario only. Now coming to second point why I used findElements because all elements has same id or attribute then how to handle them using there text and how to operate them. hope it is clear now and if it is still not clean then let me know and If you want to understand some real time scenario then share with me I will cover them in my next videos.
Thank you so much mukesh!!! These tutorial has really invoked my worked easier!!!
Thank you Mohammed ,Glad it helped you. Keep learning.
Mukesh very soon I will become automation tester because of your excellent training videos on selenium. You are doing great job.
Thank you so much Praveen Keep learning.
Hi Mukesh , Thank you for your time which is helping us to understand easily.As you are educating us for free we should understand the passion you has for guiding us. Now a days nothing we get for free, so we can ask the clarifications in a polite way which will help so many like us in longer run.
So nice of you Satesh
Hi Mukesh, I have learned a lot with your channel. Thanks for giving free guidance to everyone.
Thank you Prem bhai
Thankyou Sir, you have no idea how much these videos of yours is helping us as testers 👍 Great knowledge and information for newcomers. Please do take a little care of the volume, since it's not loud and clearly audible. Also if possible do upload new Selenium (imp topics) videos.
Thanks Apu for nice feedback. I have taken new mic for videos, so new videos have good voice. I have planned to make new videos on some important topic and will upload soon.
The best on youtube, fantastic, keep up the good work.
Thanks mate :)
Wow..beautiful explanation ! simple and understandable.Thankyou!
Thanks Kavitha
@15:55 spoon dropped and girl is giggling ......most of your videos have these funny sounds in background which makes it more interesting ...
Very productive videos... thank you so much 😄
Thank you Priyanka
Nice Video with simple explaination....
Thanks Vidya
Hy.. You are doing good job for all testers thank you.. I need to perform Aws marketplace testing.. I don't know anything about it.. Can u please give some idea in short or share any link regarding it.. Thank u
Hi Richa, really sorry about Aws marketplace testing never heard before.
Really very helpful...thanks a lot
Welcome Awanish
Thank you God bless you
Very helpfull
Glad it was helpful! Thanks Karthik
How to assert whether checkbox1 is selected or not
Hi Mukesh, Hope you are doing good.
Need your understanding on a scenario where in a web page there are multiple check boxes which need to be displayed on the console and the user has to select multiple options (say max 3). I am able to display the options but stuck on selecting multiple check boxes.
Thanks.
Hi Rajeev what issues you are facing?
I am not able to select more than 1 check boxes. I have to check any 3 options/boxes out of 10.
Nice and very useful video
+diksha singhal thanks Diksha keep visiting
Hi Mukesh , I am new to Selenium but have 10 years of experience in JAVA.Your tutorials are awesome.I wanted to switch from development to testing.
In this tutorial , I have a doubt.
Here while handling checkbox ,why we did not take By.getID("code") ? Instead we took xpath and looped around and compared with id ? Any specific reason for this ?
Hi Mukesh,
We could have directly given xpath till the radio button/check box which we want to click. Why we are storing it in list and then click on it?
Is this the standard way of coding?
Hi Aditi,
Yes, you are correct we can give direct xpath and click. In above approach, you can pass data as well which will help you when you use the framework.
Hi.....
Please help me.I spent an hour and could not get the text of the checkboxes. Instead of using the getAttribute, I wanted to get the actual text of the WebElement. Below is my Code: ( What I have retrieved from the below code is " CheckBox Elements are (nothing came up) ).
List checkbox = driver.findElements(By.xpath("//input[@type='checkbox']"));
for (WebElement text : checkbox) {
String value = text.getText();
System.out.println("Checkox Elements are: " + value);
}
getAttribute("innerHTML") and getText() does the same job.
Hi @Mukesh Sir, I am confused that if we can find the radio button simply by xapth (learned it from your tutorials by using indexes to get the exact location) then why do we need to write the for loop code.
2:17 good example of xpath
How to use selenium for java based web sites i.e .JSP pages as page elements can't be viewed... ?
Hi Mukesh, not able to get the inserted data. If I select the option, I am trying to read the selected attribute. In the Dom inside the div two different elements are there . One is for option and other one for label . How to achieve this.eg option &bsc MCA
Hi Pratheep, can u share sample url? Did you try using getText method?
Thank you works wonderfully (Y)
Hey Anwar Thank you so much :) I am glad it helped you. Keep visiting.
Hi Mukesh. Could you please make one video on How to deal with inconsistent tests.
Hi mukesh, As a tester wht would we chk here? We would check if each option is getting selected as an end user would like to select.for example... if i want to select both the options as an end user Java and Ruby then this program should allow that.If possible try n relate to hw testers are supposed to test real time.Thanks
Hi Harmeet, as a tester we can check using isSelected method. It will return true if Selected and false if not selected.
Hi Mukesh, Y aren't we saying If(value.contentEquals("Ruby")) . Any specific reason? Because in your previous video, you showed as If(innerHtml.contentEquals("JavaScript"))
hi mukesh .. your videos are the best among all other videos uploaded on the you tube . I have copied all your data excel code for my slef..but since last night i am getting array bound of exception on one particular line :
This particluar method on this particular line always gives me an error :
public int getRowCount(int sheetIndex)
{
int rows=wb.getSheetAt(sheetIndex).getLastRowNum();
rows=rows+1;
return rows;
}
Hi Neeraj seems some index issue.
thnx mukesh
Dear Mukesh, in www.goibibo.com/flights/ site. the radio button elements does not have value attribute.so how to click action of particular radio button?
You can find xpatha and click.
thank you sir its very much usefull
Welcome Anita :) Happy Weekend.
Hi Mukesh! Iam getting error in my eclipse regarding WebDriver driver =new ChromeDriver();
In both Webdriver and ChromeDriver,compiler is giving options to create classes of both.Why I am getting this?
I am also getting error in By class in By.xpath as By cannot be resolved
Hi Rahul, it means you have not configured Selenium jar. Follow this video to configure properly
th-cam.com/video/oo8hakhidQM/w-d-xo.html
Hello Mukesh could you tell me how to select the multiple checkboxes if there is no value defined in HTML and it have a span tag
As we have already selected the radiobutton as ruby in our first scenario. If we re-run the same scenario,it will fail. How we can validate that multiple radiobutton values are selected and deselected??
Hi Anmol, Radio buttons are single selection, you can select multiple checkboxs.
Hi Mukesh,
But how about if you have n no of check boxes on the webpage and you have to select last second check box how this can be achieved.
+Bina Khatnani Hi Bina this is quite easy first you can take the count of checkbox let's say n and then you can take n-1 and use that in click event
Hi Mukesh, how can we select multiple radio buttons using For loop,can you please guide.
what issue you are getting? Checkbox can be selected multiple times but radio button we can select only one.
Hi Mukesh can you please tell me how to automate silverlight
Hi Anand, Selenium is not best fit for silverlight applications.
Hi mukesh.. nice video.. can u pls clear my doubt? i have to choose dynamically changing checkboxes which are written as list in the html code. when i tried your method with muliple 'if' stmnts to choose say checkboxes1,4,8 im getting 'STALE ELEMENT EXCEPTION' . Can you please helpme out..The application is amazon choosing more than one brands in the options.Thanks in advance.
Hey Mate, Stale Element Exception can be ignored by finding element again or by using By class.
how I can browse thru all the available videos in a sequence
HI Mate you can follow them in below sequence learn-automation.com/selenium-webdriver-tutorial-for-beginners/
Hi Mukesh, I am trying to click the radio button in facebook, when I write the following statement List radio = driver.findElement(By.id("u_0_6")); , it gives me Type Mismatch, cannot covert WebElement to List error. How to fix this. Thanks for helping.
you have used findElement method it should be findElements
Thankyou sooo much for quick response. I am your new subscriber. Good luck.
hi mukesh please can you explain me what is generic xpath......?
Hi Vijay, Kindly refer below video for more detail about xpath th-cam.com/video/As72m9qrAQ8/w-d-xo.html
i request Mukesh Otwani sir... to please upload all the videos with high volume of voice. its hardly audible.
Hi Aamir,
Yes few old videos does not have good quality voice. Can you check new video's volume?
Hi Mukesh. Thanks for your great Videos. Can you post a video on how to capture browser traffic using Selenium? I have seem few posts trying to use browsermob-proxy, but I couldn't get it to work. Thanks much!
Hi Ibrahim no experience in this :( But I will give a try
Okay. Thanks. I was able to capture network traffic using PhantomJS and Selenium WebDriver. Let me know if you are interest in getting the code :)
Yes Please let us know so that it will help others too.
email mukeshotwani@learn-automation.com
Hi Mukesh thanks for this wonderful video. Can you please tell me how I can do that in POM?
What is the issues in POM?
I am trying to use the assert true function in POM to distinguish whether if my test has failed or pass but for some reason it keeps failing. I am not really sure if I am doing it the correct way. if you can give some info on how to use Assert function on POM?
ok any sample code which you tried?
Yes sure, so i have two packages one for locating the webpages and one for test cases.
Codes the come from the webpages package:
public boolean verifyResetPageText() {
WebElement ver = Driver.findElement(By.xpath("html/body/div[1]/div/div/div/div[2]/div/p[1]"));
return ver.getText().contains("Your password has been successfully reset.");
}
Testcase package holds this codes:
WebPage_Forget_Password_Thankyou verify =PageFactory.initElements(Driver,WebPage_Forget_Password_Thankyou.class);
Assert.assertTrue(verify.verifyResetPageText(),"failed");
Thanks a lot Mukesh.
Hi Mukesh just let you know i have fixed this problem. The issue was the browser kept closing before it reach to the XPATH but i have added implicit wait which has solved the problem. Thanks a lot man :)
Hi mukesh, How to select multiple checkboxes in python selenium?
Hi Amritha, sure do you have link or application for reference.
Hi Mukesh
Below given link is not working
To practice selenium
Hey Ahmed here is the link seleniumpractise.blogspot.com/2016/08/how-to-automate-radio-button-in.html
@@Mukeshotwani thanks
Hi Sir
How to Select two Radio button for the above example .
I need to select Female Radio Button and Java button.
Hey Shweta, Radio button are single select, you can select multiple checkboxes.
One question if these have different texts so why cant we use XPath with text?
I too have a same question
This approach will be useful when you have set of elements and you dont want to iterate one by one.
Hi +Mukesh otwani
I have question what if the attribute named value is not present and all other attributes are same
How to handle that situation
How Can we use JavaScriptExecutor here ?
any example site so that I can check?
So how to handle Hidden elements (Male and Female) on above.
Abhay here is the video for the same th-cam.com/video/2eEr0jtmpwE/w-d-xo.html
::before
::before points at radio button, how to get the locator or how can I click at radio button, thank you
Hi Bekzod, you can get xpath till label tag
Video is superb just you have given too much advertisements which is hiding the content and distracting the viewer from the topic.
HI Rahul Advertisement handled by Google so how many ads coming I cant control.
The link you have shared is not working...can you please share the correct link ??
Hi Neha,
This link is working seleniumpractise.blogspot.com/2016/08/how-to-automate-radio-button-in.html
Hi , what if the text is also same. Example : On a page there are multiple amount text boxes , how to handle them ?
Hi Mate, Practically text wont have same because it will not make any sense.
Mukesh otwani It can be same. Example : On myntra wishlist we have multiple add to cart buttons. So what can be done in this case.
Can you make a video for sign up in to gmail bcz i am confused in handling drop down of Month while inspecting i am not seeing any Select tag.
Hi ANkit,
Please follow below video for more details th-cam.com/video/eMLXegqvuwU/w-d-xo.html
What is dynamic text box and how to handle in Selenium
any example site so that I can check?
Hi,
How to do same using UIAutomatorViewer?
Please help
Hi Navya can you explain your requirement in details so that I can help you?
@@Mukeshotwani how to handle radio buttons ,check boxes and drop downs in native app(Android -Appium) by using uiautomatorviewer ... Please help
Hi can you please tell me how to select a option in radio button....i am getting the output like yours but i need to select one those option......NEED HELP ASAP
You can use equals methods like I did to select values @ run time or from excel based data.
This is my tag I need to select this.....can you help me with this please.
You can use index as well..
OK I'll try and will update here...
thanks mate.
k Cool
hi mukesh
i wrote your code typical but i have the following error :
" Error communicating with the remote browser. It may have died."
? any advice
Hi Maryam, Which browser and Which selenium version you have used?
Use Selenium 2.53.1 with FF 46 and Chrome Latest driver 2.29 to work with Chrome.
i'm using firefox browser
actually it's work fine with chrome but with firefox i have this error
i'm using selenium version 3.4 and firefox version 53
and i tried version 48 but it also not working
FF 46 will work with Selenium 2 and if you using Selenium 3 then Gecko driver is must. Check out below post for more details
learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/
Sir Mukesh otwani Why in this case ,it is pointing to null pointer exception?? Plz explain??
List checkbox=wd.findElements(By.xpath("//input[@type='checkbox' and name='lang']"));
for(int j=0;j
If no element is found using xpath in findElments empty list is returned
Hence, kindly Check your Xpath
I have a doubt here. for checkbox, instead of writing a xpath with type attribute, why cannot use the id attribute directly like [//input[@id='sing']]
Where is the reply ?
Yes you can do that as well. This approach is very useful when you have to pass data from excel.
Kindly check my reply below.
Thanks mukesh. I am learning from your playlist and it is really good n helpful. Thank-you
hello sir beginner keliye series kab upload karoge
ye beginner ke liye hi hai bhai
Please take care of the audio..there is lot of crunching sound which is very disturbing to my ears..and the advertisments are hiding the content
Hi Harmeet, in recent videos you will not get much background sound.
In case, if the radio button is by default in "Checked" state, how to uncheck ?
HI Mohit, If it is Checked state then click action will make it unchecked.
How to select the checkbox by passing the checkbox name from excel
(If i pass the check box text from excel sheet, then corresponding checkbox should be selected in the application)
Hi Rajendra you need to MAP this (excel with method) for example male yes female no based on mapping you can read true/false and use it accordingly in your code.
It would be good if you cn give the real time examples instead of using your own page..we can relate to that..Secondly whts the use of using findElements...what are we trying to achieve here..its not clear but explain it in a way that we can relate to real time examples...Rest the videos u make are very useful
Hi Harmeet,
I am trying to explain here the logic about multiple/dynamic checkbox/radio button etc. If you understand the logic then u can implement in any application. The page which I created has the same scenario if you check other application like facebook, Gmail etc you will find the same scenario. At the end of the day its all HTML. In simple words, this is real scenario only.
Now coming to second point why I used findElements because all elements has same id or attribute then how to handle them using there text and how to operate them.
hope it is clear now and if it is still not clean then let me know and If you want to understand some real time scenario then share with me I will cover them in my next videos.
I almost shat my pants a couple of times. These freaking noises are terrible especially if you are listening through headphones.
Hey Eugene really sorry for background noise. I have improved a bit and now in recent videos, you will not find this noise.
Hope you understand this.
non IT student ke liye
can you speak loudly
Hi Harshu, my few old videos has low sound. Can you check new videos?