I have paid $400 for Udemy to learn online and they couldn't explain this drop-down thing at all , it sucked but you made it look so easy ... Just superb 👌
Mukesh! I always though automation was hard and i would never be able to learn it, specially by coding. But your method of teaching has proved me wrong! Thank you so much for sharing the knowledge. Keep up the good work! :) Here is what I wrote and it worked like a charm: Select monthdd = new Select (driver.findElement(By.id("month"))); monthdd.selectByIndex(2); Select daydd = new Select (driver.findElement(By.id("day"))); daydd.selectByIndex(28);
Hi Anjali, You can click on dropdown then fetch all the values and use loop to iterate. I am attaching the sampple code. You can also check google autocomplete scenario which will give some idea about same ruclips.net/video/iNkIXVgHXZM/видео.html // Find the dropdown element and click to expand WebElement dropdown = driver.findElement(By.className("oxd-select-text--active")); dropdown.click(); or WebElement dropdown = driver.findElement(By.xpath("//*[contains(@class,'select-text--active')]")); dropdown.click(); // Wait for the dropdown options to be visible List options = driver.findElements(By.xpath("")) // Loop through each option and perform actions (e.g., printing or clicking) for (WebElement option : options) { System.out.println("Dropdown option: " + option.getText()); // You can also click on each option to select it // option.click(); }
Where is part 2 of this video where in you have explained the 2nd one i.e handling drop-down without select tag..pls provide the link . Didn't you take the same example which you demonstrated here
Hi Raveena, What issues you have with Assertion? I have 2 videos on Assertion on RUclips. Please have a look and let me know if you still have doubt. Here are the quick link for both videos Hard Assert- ruclips.net/video/dvUPSnGQZCM/видео.html Soft Assert - ruclips.net/video/JJygt4XCLBo/видео.html
Hi Mukesh, I really like the way you are teaching, May in know how to verify go to one drop down(select with for loop) to another drop down(select with for loop) and add value in the text box and remove value from last text box and again go to 2nd drop down and select value and go to 3 next text box and add value and remove value (i have tried so many way but its not working if you can, can you please help me with this)
Hi Mukesh,the way you explain is really really good.. am following your videos it's really awesome, your way of teaching is awesome. can you explain jdbc connection.
Hello mukesh i am working on manual testing got good knowledge on core java recently... wanna go in selenium .... what pprtions of java i should concentrate to improve my selenium . This will be very helpful for me
HI Mukesh, This video is very helpful for me. Thanks for this video. There is one drop down and in which having the colors(style="background-color: rgb(186, 182, 182);) so I am not able to handle this dynamically. Even dont have text of colors in tag. can you please help me to sort out this? Here Im not able to attach any screenshot.
Hi Mukesh.. Need a help.. As you have mentioned in the video for Gmail application. the dropdown we need to select and display is using div tag. Pls let me know whether u have video for that..I have an application where i need to select and display dropdown by using input and div tag..Need to traverse from start to end by writing dynamic xpath
Hi Mukesh, a BIG thank you for these videos! You're really gifted in teaching. I created the expected list of vales, stored them in an array list, but still cannot code correctly the assertion part. Please could you share the code for the assertion part? Thanks!!!
Hi Mukesh, I am fresher for selenium. your videos are very helpful to me. but I requested to you,please arrange sequence wise video playlist. because there are confusion for new selenium learner. When u have done video for "how to work with multiple browser", then next video is play for "how to handle dropdown". In this video you are using TestNg, but you didn't explain how to use TestNg and directly you used @Test keyword before public void method. So please arrange sequence wise playlist. It is better for all.
Hi Mittal, You can follow the videos in below sequence learn-automation.com/selenium-webdriver-tutorial-for-beginners/ Don’t forget to subscribe my RUclips Channel
Hi Mukesh, I thank you from the bottom of the heart for the detailed tutorials in selenium. The information is very detailed and top class. I have one small query when I copy paste the class like you like facebookdropdown to facebookdropdown 2 then edit second class (facebookdropdown 2) then the content of the main class is also overwritten. Then both files have the same code. Can you please update where I'm doing wrong. Thanks in advance.
Hi Mukesh! Thanks for the videos. I just saw your video on how to handle dropdown using selenium. program runs successfully but it is selecting different values from the one i passed in the find element property and there is no error in the console. Can you tell me what could be the possible problem?
HI Mukesh, thank for this video. When I put ´Select month_dd = new Select(month_dropdown);´ I got this error message ´Cannot instantiate the type Select´. I inclued all the packages needed, but it is still not working. Could you please help me with this question? Thanks!
can i save the value of drop down after selecting it, like month_dd.SelectByIndex(3) here, i.e. afterselectvalue= month_dd.SelectByIndex("12"); and then printing SOS(afterselectvalue.getfirstselectedoption();)
Hi Mukesh, I couldn't find your video for handling drop-downs with div tags. All the content I am trying to automate is under div tags. There is no li or select tags.
Detailed and easy to understand lectures. Thank you to provide these all. can you provide me the code to compare the list of expected and actual ? I tried by my own but stuck in between.
I got solution, below piece of code i have added to your code (SelectFacebookDropdown3) to test if the list is matching. But not sure if this is correct or what. please check and give me feedback. ArrayList expected_day=new ArrayList(); expected_day.add("1"); expected_day.add("2"); expected_day.add("3"); expected_day.add("4"); expected_day.add("5"); Assert.assertEquals(day_list, expected_day);
Hello Sir!! could you please explain the line no - 21 WebElement month_dropdown = driver.findElement(By.id("month")); Did I get it correct if I say we are assigning an object that we get from "driver.findElement(By.id("month"))" to month_dropdown which is of type WebElement interface?
Hi Mukesh,Thanks for the excellent explanation. i have a requirement where i need to test 2 drop downs where drop down2 will get refreshed based on drop down1 value.How can we check if drop down 2 has no value for the chosen dropdown1 value.I understand that we can handle this scenario in java list.size(),but do we have an option in selenium for this scenario.
Hi can you please help in to select value in dropdown list through excel sheet actually i am trying but i am not able to do it since i want use if else condition with it, its not working as it should.
Hi, I have a question regarding Selenium. let's say that I am using selenium to create a routine automation instead of an test automation. And this routine will help not just me but others colleagues also. These colleagues don't know anything about programming. So I wish I could create some "desktop application". like an icon that they just click on it and the script will run. Without need of the Eclipse IDE or anything else. The point is that the webdriver follow a path, and this path is from my computer. also, there is a file, and the path if from my user. so I not sure on how to do it Can you help with that? I appreciate, thank you so much. If you know some other way, it is not necessary to be a desk app, could be online, on a server, I don't know.
Hi Mukesh, How to select multiple items in selected dropdown . ex one dropdown country and we have to select two country i.e. India and China at one time is this possible????
Hi Mukesh, Thanks for the video. I'm beginner in Automation. Could you please explain me why you didn't set any property for FirefoxDriver in this program ? Whenever I create new project or new class its trowing me an error. Please explain me. Thanks in Advance
Hi Mukesh, I have doubt, if a dynamic dropdown consist of repeated values like {2,1,3,4,2,1,8,9,7,2} if i select a value then at index 2 it should be 1.How do write a code for that?
In this example 1 if I chose to have following code month_dd.selectByIndex(2); month_dd.selectByValue("2"); if both code return same results then what is the difference between selectByIndex and selectByValue? or I am missing something ...
Hi Sir, first of all great video, Can you please explain WebElement month_dropdown =driver.findElement(By.id(“month”); syntax. I didn’t understand why are you giving this.
Hi Mukesh, Good Day, I was wondering : -Why do we have to use the annotation for this example? -Why when I follow up with your in your video, when trying to import the package for testNG the only one I have is the one for JUnit?(Does it make that much of a difference anyway) I'm new in automation and I'm working my way up there :)
Hi Mukesh , your explanations are really nice and I need to know how to select dropdown value if we have div tag and Select UI does not seem working . Kindly help me out.
Hi Sir, After selecting, I'm trying to deselect same, selection is working but deselect is throwing expection like below. Please guide me. Code: WebElement Year =driver.findElement(By.cssSelector("select[id='year']")); Select Year1=new Select(Year); Year1.selectByVisibleText("1995"); System.out.println(Year1); Thread.sleep(3000); Year1.deselectByVisibleText("1995"); System.out.println(Year1); Expection : java.lang.UnsupportedOperationException: You may only deselect options of a multi-select
Yes Neha, we have soft assert and assert class in testng which will help you to perform assertion. Here is the link ruclips.net/video/dvUPSnGQZCM/видео.html
Hi Mukesh, Can you please provide me the code for validation just for checking i am doing it in correct way or not. Thanks in Advance and by the way you are doing a great job thank you man.
Hi Mukesh , how we can handle the dropdown which is there in Gmail sign up page (Birthday,Gender) i am trying to do it via select it not working that way .you have talked about it in video at(4:14). please help thanks !!
(1) In a drop-down where you can only select one option from and the drop-down is coded using DIV or SPAN tags (NOT the Select tag). How to click a drop-down option there ? (2) How to achieve that goal using Actions class ?
Hi Mukesh, Could you please tell me "how to validate unique text value for particular field by using selenium??? for example, while registering Gmail we have to provide our unique gmail Id. like the same for validating such a field what the code required?? I hope you got the point. Please suggest me Mukesh or any one knows tell me....
Hi Mukesh ,I liked the way you are teaching . I was not able to find the video where you have shown example for facebook.com for different type of select drop down ,Can you provide the link please
Hi, Mukesh can you please answer my question (Hi Mukesh, Nice work.I have learned so much from you. Thanks. I have a question regarding Multiple dropdowns. Do I need to Create an everytime Select class for more than one dropdown ? or is there any code, that I can call them?Example: Facebook "Month-Day-Year")
Hi Mukesh, videos are so helpful. I have a problem to enter value in text field or select month from drop down to automate Facebook Account open page while i using "driver.manage().window().maximize();" .
Hi Mate, if you have any other dropdown apart from Select tag then you can follow below approach. It is applicable for Bootstrap, KendoDropDown and Angular JS dropdown as well ruclips.net/video/eMLXegqvuwU/видео.html
Hi Mukesh, why we have to use this all method? when we can simply select values from dropdown using - driver.findElement(By.xpath(".//*[@id='BirthMonth']/div")).sendKeys("May"); driver.findElement(By.xpath(".//*[@id='BirthDay']")).sendKeys("21"); driver.findElement(By.xpath(".//*[@id='BirthYear']")).sendKeys("1989");
Hi Mukesh, thanks for the wonderful content and i have one doubt *Im getting assertion error while comaring ListofWebelements(actual) with Arraylist(expected).* can u help me with this Thanks once again.
Hi Mukesh, When I'm trying to run the program, I can't see the TestNG option. As you said I did imported org.testng.annotations.Test by writing @Test in the program but still I didn't get that option. Please help me with this Thanks in advance
I have paid $400 for Udemy to learn online and they couldn't explain this drop-down thing at all , it sucked but you made it look so easy ... Just superb 👌
Hey Mustafa, I am very glad to read this comment from you. Thank you
@@Mukeshotwani Totally Agree with Mustafa
this is one drop down. there is like 3-4 different kinds. the best way is to manual test first and then do automation.
I too have paid to Udemy but have learnt most of the concepts of Java and Selenium following Mukesh Sir's video.Thanks alot.
Mukesh! I always though automation was hard and i would never be able to learn it, specially by coding. But your method of teaching has proved me wrong! Thank you so much for sharing the knowledge. Keep up the good work! :)
Here is what I wrote and it worked like a charm:
Select monthdd = new Select (driver.findElement(By.id("month")));
monthdd.selectByIndex(2);
Select daydd = new Select (driver.findElement(By.id("day")));
daydd.selectByIndex(28);
Cheers Man :) Happy weekend. Keep learning.
last few months i am following your videos it helped me
Glad to know Chris Keep learning.
Bro...your videos and explanation is crisp and clear...very nice tutorials
How to handle dropdown in selenium using tag in HTML
HI Vaishali here is the link learn-automation.com/handle-bootstrap-dropdown-in-selenium-webdriver/
Thank You Mukesh. It's all videos very helpful for me. from beginning to expert level Thank's a lot mukesh.
Hi Mukesh, Simply Awesome.... Easy to catch the points...And now very clear in such concepts.... Thank You...
Hey Shibi I am glad it helped you. Keep visiting.
Hi, Mukesh , you cleared so many points in this tutorial and that too with detail explanations. Thanks.
Hi Zainub, I am glad it helped you.
I'm impressed with your way of teaching.Even Non-it guys also can understand easily Good Job
Thanks Krishna :) I am glad it helped you.
Hi Mukesh, How to select all dropdown values from class 'oxd-select-text oxd-select-text--active'
Hi Anjali,
You can click on dropdown then fetch all the values and use loop to iterate. I am attaching the sampple code.
You can also check google autocomplete scenario which will give some idea about same ruclips.net/video/iNkIXVgHXZM/видео.html
// Find the dropdown element and click to expand
WebElement dropdown = driver.findElement(By.className("oxd-select-text--active"));
dropdown.click();
or
WebElement dropdown = driver.findElement(By.xpath("//*[contains(@class,'select-text--active')]"));
dropdown.click();
// Wait for the dropdown options to be visible
List options = driver.findElements(By.xpath(""))
// Loop through each option and perform actions (e.g., printing or clicking)
for (WebElement option : options)
{
System.out.println("Dropdown option: " + option.getText());
// You can also click on each option to select it
// option.click();
}
ur lectures r too good,,i request u sir to plz arrange them in a sequence,,so that it will be more nd more helpful for all,,
Hi Ritika,
You can follow them in below order
learn-automation.com/selenium-webdriver-tutorial-for-beginners/
Where is part 2 of this video where in you have explained the 2nd one i.e handling drop-down without select tag..pls provide the link . Didn't you take the same example which you demonstrated here
Thanks for the great explanation! I wish you the best!
Thanks, you Najib.
Hi Mukesh,the way you explain is really excellent...good job
Thanks jagu
Thanx Mukesh!! ur tutorial helping me a lot in learning Automation.
+Niru Shrivastava Your most welcome Niru keep visiting and let me know if any help required from my side
Hi mukesh your explanation and videos superb keep it up,i will learn lot of things.
Thanks
Thanks Ashok bhai
Very Good Explanation. Thanks Mukesh...!
Hey Shankar I am glad you liked my videos. Keep visiting and let me know if any help required from my side.
Sure Mukesh. I am going through all the videos and I will let you know if I need any help
Tq sir u teaching is too good
easily understood the topic .. :) thanks Mukesh ...
Welcome ABhi :) Keep visiting.
I really liked the way of teaching!!thanks a lot
Thanks Simna 🙏🙏 keep learning more videos are coming on Test Automation
thank you soo much sir.
Hi Kareem, I am happy it helped you.
Nice video Mukesh! Thank you!
+Lucas Ribeiro Welcome Lucas keep visiting.
Ur videos are really very helpful. Thanks for ur great effort. Please guide me with assertion
Hi Raveena, What issues you have with Assertion? I have 2 videos on Assertion on RUclips. Please have a look and let me know if you still have doubt.
Here are the quick link for both videos
Hard Assert- ruclips.net/video/dvUPSnGQZCM/видео.html
Soft Assert - ruclips.net/video/JJygt4XCLBo/видео.html
Mukesh otwani ok.. Mukesh. I wil refer them and let u know if i have any issues
You are a lifesaver! Thanks a lot!
Hey Otso :) Thanks.. Happy holidays..
Thanks mukesh.
Hi Mukesh, I really like the way you are teaching, May in know how to verify go to one drop down(select with for loop) to another drop down(select with for loop) and add value in the text box and remove value from last text box and again go to 2nd drop down and select value and go to 3 next text box and add value and remove value (i have tried so many way but its not working if you can, can you please help me with this)
Hi Mukesh,the way you explain is really really good.. am following your videos it's really awesome, your way of teaching is awesome. can you explain jdbc connection.
Thank you Dhanraj :) You can check JDBC here ruclips.net/video/CjNqKlTluxc/видео.html
Great Stuff Mukesh, these videos really helping me in learning selenium
Welcome Ashish
Hello mukesh i am working on manual testing got good knowledge on core java recently... wanna go in selenium .... what pprtions of java i should concentrate to improve my selenium . This will be very helpful for me
As you mentioned in video there is another scenario if we have div tag can you let me know where can i find video with div tag
HI Mukesh, This video is very helpful for me. Thanks for this video.
There is one drop down and in which having the colors(style="background-color: rgb(186, 182, 182);) so I am not able to handle this dynamically. Even dont have text of colors in tag. can you please help me to sort out this?
Here Im not able to attach any screenshot.
Hi Mukesh.. Need a help.. As you have mentioned in the video for Gmail application. the dropdown we need to select and display is using div tag. Pls let me know whether u have video for that..I have an application where i need to select and display dropdown by using input and div tag..Need to traverse from start to end by writing dynamic xpath
Hi Mukesh, a BIG thank you for these videos! You're really gifted in teaching. I created the expected list of vales, stored them in an array list, but still cannot code correctly the assertion part. Please could you share the code for the assertion part? Thanks!!!
Hi Mukesh in this video u told that you will make extension video for this tutorial but where is that one.
Hi. Mukesh can u plz suggest me how to handle kendo dropdown
Hi Mukesh, following your videos very seriously, its excellent and very helpful. Can you please help me with the Assert Code ??
Hey vivek ruclips.net/video/JJygt4XCLBo/видео.html
@mukesh how to handle search and select type of dropdown values?
Hi Mukesh, Can you please guide how to select a random value from drop down.Thank you
Hi mukesh is there any video showcasing the same using Python and xpath selecting from an IE alone drop down list..
Hi Mukesh,
I am fresher for selenium. your videos are very helpful to me.
but
I requested to you,please arrange sequence wise video playlist.
because there are confusion for new selenium learner. When u have done video for "how to work with multiple browser", then next video is play for "how to handle dropdown".
In this video you are using TestNg, but you didn't explain how to use TestNg and directly you used @Test keyword before public void method.
So please arrange sequence wise playlist. It is better for all.
Hi Mittal,
You can follow the videos in below sequence
learn-automation.com/selenium-webdriver-tutorial-for-beginners/
Don’t forget to subscribe my RUclips Channel
Thank you...Mukesh
Hi Mukesh, I thank you from the bottom of the heart for the detailed tutorials in selenium. The information is very detailed and top class. I have one small query when I copy paste the class like you like facebookdropdown to facebookdropdown 2 then edit second class (facebookdropdown 2) then the content of the main class is also overwritten. Then both files have the same code. Can you please update where I'm doing wrong. Thanks in advance.
Hi Mukesh! Thanks for the videos.
I just saw your video on how to handle dropdown using selenium. program runs successfully but it is selecting different values from the one i passed in the find element property and there is no error in the console.
Can you tell me what could be the possible problem?
HI Mukesh, thank for this video.
When I put ´Select month_dd = new Select(month_dropdown);´ I got this error message ´Cannot instantiate the type Select´. I inclued all the packages needed, but it is still not working. Could you please help me with this question? Thanks!
Mukesh in which tutorial have you discussed handling of dropdown coming under "Div" tag ??
what is the dropdown disappears before you can inspect it? like on amazon?
please could you help me... to print even numbered years in a dropdown... if u know please upload one video regarding that
Hey Banu, you can use getOptions() which will return List of WebElement then you can use logic for even or add or any other logic.
Hi Mukesh, Please Share the code for expected list of values and store in List.
Thanks for your help
Hi,
I want to select the value from drop down which will be the sorted value of price from low to high and display it.How can I do this.Please help.
can i save the value of drop down after selecting it, like month_dd.SelectByIndex(3) here,
i.e. afterselectvalue= month_dd.SelectByIndex("12"); and then printing SOS(afterselectvalue.getfirstselectedoption();)
Its work for me. Thanks @Mukesh
+rakesh jha cheers Rakesh
Hi Mukesh, I couldn't find your video for handling drop-downs with div tags. All the content I am trying to automate is under div tags. There is no li or select tags.
How to handle dropdown when the element is present in nested . Pls let me know
Detailed and easy to understand lectures. Thank you to provide these all.
can you provide me the code to compare the list of expected and actual ? I tried by my own but stuck in between.
I got solution, below piece of code i have added to your code (SelectFacebookDropdown3) to test if the list is matching. But not sure if this is correct or what. please check and give me feedback.
ArrayList expected_day=new ArrayList();
expected_day.add("1");
expected_day.add("2");
expected_day.add("3");
expected_day.add("4");
expected_day.add("5");
Assert.assertEquals(day_list, expected_day);
That's Great kanchan I will check and provide feedback
sure, i will be waiting for your feedback. Thank you !!
hi mukesh, can u tell how to select the drop down like the one you mention in gmail link (3:45 - 3:50)
Hi Mukesh, Im wondering how is your script working without setting system.set property?
Hey Fathima, yes you can do that by setting path of driver in environment variable
ruclips.net/video/sTdXettm1y8/видео.html
Thanks for letting me know
think you for video,i have probem when the page facebook open ,a dialog page opens to accept cookies,what i can i do (i use chrome)thinks
Hello Sir!! could you please explain the line no - 21
WebElement month_dropdown = driver.findElement(By.id("month"));
Did I get it correct if I say we are assigning an object that we get from "driver.findElement(By.id("month"))" to month_dropdown which is of type WebElement interface?
Nicely Explained :-P
Hi Mukesh,Thanks for the excellent explanation.
i have a requirement where i need to test 2 drop downs where drop down2 will get refreshed based on drop down1 value.How can we check if drop down 2 has no value for the chosen dropdown1 value.I understand that we can handle this scenario in java list.size(),but do we have an option in selenium for this scenario.
Hi can you please help in to select value in dropdown list through excel sheet actually i am trying but i am not able to do it since i want use if else condition with it, its not working as it should.
Hi, I have a question regarding Selenium.
let's say that I am using selenium to create a routine automation instead of an test automation.
And this routine will help not just me but others colleagues also. These colleagues don't know anything about programming. So I wish I could create some "desktop application".
like an icon that they just click on it and the script will run. Without need of the Eclipse IDE or anything else.
The point is that the webdriver follow a path, and this path is from my computer. also, there is a file, and the path if from my user. so I not sure on how to do it
Can you help with that? I appreciate, thank you so much.
If you know some other way, it is not necessary to be a desk app, could be online, on a server, I don't know.
How to automate searching any keyword on webpage. Say I search "data" on any page and verify that all get highlighted and count for that
Hi Mukesh,
How to select multiple items in selected dropdown .
ex one dropdown country and we have to select two country i.e. India and China at one time is this possible????
Hi Mukesh,
Thanks for the video. I'm beginner in Automation. Could you please explain me why you didn't set any property for FirefoxDriver in this program ? Whenever I create new project or new class its trowing me an error. Please explain me. Thanks in Advance
Hi Mukesh,
I have doubt, if a dynamic dropdown consist of repeated values like {2,1,3,4,2,1,8,9,7,2}
if i select a value then at index 2 it should be 1.How do write a code for that?
In this example 1 if I chose to have following code
month_dd.selectByIndex(2);
month_dd.selectByValue("2");
if both code return same results then what is the difference between selectByIndex and selectByValue?
or
I am missing something ...
Thank you, makes so much sense. A question though- how do you handle cases where other elements obscure the dropdown?
Hi Sir, first of all great video,
Can you please explain
WebElement month_dropdown =driver.findElement(By.id(“month”); syntax. I didn’t understand why are you giving this.
Hi Mukesh, Good Day,
I was wondering :
-Why do we have to use the annotation for this example?
-Why when I follow up with your in your video, when trying to import the package for testNG the only one I have is the one for JUnit?(Does it make that much of a difference anyway)
I'm new in automation and I'm working my way up there :)
Hi Mukesh,
Thanks for sharing this awesome videos. Please guide me how can I use drop down selection in POM?
Hi Bibhas,
you can use something like below
public void statusDropDownList(int index) {
Select drop = new Select(status);
drop.selectByIndex(index);
}
Thanks Mukesh...
And could you please make a video for how to login gmail in c# using Selenium.
Hi Saraswathi sure will try.
Awesome
Hi Mukesh,
Can you please tell how to select value from autocomplete drop down in selenium.
Thanks in advance:)
Question. In real time. is the List of values supposed to be in Excel? or is it okay to just validate it with array list?
Hi Mukesh , your explanations are really nice and I need to know how to select dropdown value if we have div tag and Select UI does not seem working . Kindly help me out.
Hi Chetan,
here is the link for the same learn-automation.com/handle-bootstrap-dropdown-in-selenium-webdriver/
Hi Mukesh,
Can you please suggest me how to select value from searchable dropdown list(list appears when we type something)?
Hi, yes it is called autocomplete I will sure make video on this..
Hi Sir, After selecting, I'm trying to deselect same, selection is working but deselect is throwing expection like below. Please guide me.
Code: WebElement Year =driver.findElement(By.cssSelector("select[id='year']"));
Select Year1=new Select(Year);
Year1.selectByVisibleText("1995");
System.out.println(Year1);
Thread.sleep(3000);
Year1.deselectByVisibleText("1995");
System.out.println(Year1);
Expection : java.lang.UnsupportedOperationException: You may only deselect options of a multi-select
Can you please show us, how to automate a date-picker?
Hey Mate, I already have video and article on this. Please check this learn-automation.com/handle-calender-in-selenium-webdriver/
@@Mukeshotwani I saw your video. thanks for the link. I am using python right now. Is it the same coding used? im guessing no
Is there any tutorials on assert for verifying whether the test is passed?
Yes Neha, we have soft assert and assert class in testng which will help you to perform assertion.
Here is the link ruclips.net/video/dvUPSnGQZCM/видео.html
Soft assertions link ruclips.net/video/JJygt4XCLBo/видео.html
sir at end of video how use assert ? i m unable find the solution.. pls help
Hi Mukesh, Can you please provide me the code for validation just for checking i am doing it in correct way or not.
Thanks in Advance and by the way you are doing a great job thank you man.
Make sure your recording is done at the proper volume. The audio in this video is barely audible even when volume is turned to max.
how do u do the dropdown with div type of codes?
here is the link learn-automation.com/handle-bootstrap-dropdown-in-selenium-webdriver/
@@Mukeshotwani hey i tried that ..still i dont have /a and a href to navigate to another page in my inspect
Hi Mukesh ,
how we can handle the dropdown which is there in Gmail sign up page (Birthday,Gender) i am trying to do it via select it not working that way .you have talked about it in video at(4:14).
please help thanks !!
i am not able to get run as java application option.What should I do?
Hi Rahul please share screenshot and in order to get Java Application option you need main method in your program
thanks mukesh bhai i have doubt on selenium installation .errors came every time and import files are not generated .annotations are not generated
Sorry Ramu I did not get you. What is your requirement?
(1) In a drop-down where you can only select one option from and the drop-down is coded using DIV or SPAN tags (NOT the Select tag). How to click a drop-down option there ? (2) How to achieve that goal using Actions class ?
Here is the video for Dropdown without Select tag ruclips.net/video/eMLXegqvuwU/видео.html
@@Mukeshotwani Thanks Mukesh.. Not sure if we can perform the same task using Actions class - any idea ?
Hi Mukesh,
Could you please tell me "how to validate unique text value for particular field by using selenium??? for example, while registering Gmail we have to provide our unique gmail Id. like the same for validating such a field what the code required?? I hope you got the point. Please suggest me Mukesh or any one knows tell me....
Hi Shaik, Please use Assert Class for validation.
Hi Mukesh ,I liked the way you are teaching . I was not able to find the video where you have shown example for facebook.com for different type of select drop down ,Can you provide the link please
Hi Swetha that video is in playlist.
Hi, Mukesh can you please answer my question (Hi Mukesh, Nice work.I have learned so much from you. Thanks. I have a question regarding Multiple dropdowns. Do I need to Create an everytime Select class for more than one dropdown ? or is there any code, that I can call them?Example: Facebook "Month-Day-Year")
Hi Shahed you can create reusable method which will accept only webelement and which value you want to Select.
hi Sir
Goodevening
how handle dropdown with out using select class
Yes Chris here is the link for same learn-automation.com/handle-bootstrap-dropdown-in-selenium-webdriver/
At 08:31 u have used Web Element so what is the use if this and why it is used. Is it a return type for - driver.findElement(By.Id("month"));
Hey Anand code driver.findElement(By.Id("month")); will return WebElement which we use in Select Class
i m not able to execute the test case affter instaling the Test NG ... COuld you please help me in that
I suggest Use @Test else share the Message you receive
Hi Mukesh, videos are so helpful. I have a problem to enter value in text field or select month from drop down to automate Facebook Account open page while i using "driver.manage().window().maximize();" .
Hi Sujan, Can you please tell me what exception log you are getting ? Try also driver.manage().window().fullScreen(); method
Sir how to handle kendoDropDownList using selenium
Hi Mate, if you have any other dropdown apart from Select tag then you can follow below approach.
It is applicable for Bootstrap, KendoDropDown and Angular JS dropdown as well
ruclips.net/video/eMLXegqvuwU/видео.html
@@Mukeshotwani Thanks sir
what if the html tag is not select, you mentioned in the begining of the vid, but didnot t al about it in the vid
Here is the video Seema ruclips.net/video/eMLXegqvuwU/видео.html
@@Mukeshotwani Thanks
Hi, Why can't we just use driver.findElement(By.id("month")).sendKeys("Jul"); to select the month?
will this cause any issue?
This also will work for selecting values.
This is hardcoding....not a good practice
Hi Mukesh,
why we have to use this all method?
when we can simply select values from dropdown using -
driver.findElement(By.xpath(".//*[@id='BirthMonth']/div")).sendKeys("May");
driver.findElement(By.xpath(".//*[@id='BirthDay']")).sendKeys("21");
driver.findElement(By.xpath(".//*[@id='BirthYear']")).sendKeys("1989");
Hi Mukesh, thanks for the wonderful content and i have one doubt
*Im getting assertion error while comaring ListofWebelements(actual) with Arraylist(expected).*
can u help me with this
Thanks once again.
Hi Likhith, for comparison make sure both should be in same format. I mean both should be in ArrayList format.
Hi Mukesh,
When I'm trying to run the program, I can't see the TestNG option. As you said I did imported org.testng.annotations.Test by writing @Test in the program but still I didn't get that option. Please help me with this
Thanks in advance
HI Naga,
Kindly install TestNG from marketplace learn-automation.com/how-to-install-testng-in-eclipse/