How to handle Bootstrap DropDown in Selenium - Session - 19

  Рет қаралды 90,774

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Пікірлер: 57
@krishnakrishna934
@krishnakrishna934 4 жыл бұрын
Thank you so much Naveen i really cant express happiness ..i am just asked every person but i dont get answer like you from any1 ...Really this concept is very very useful..bcoz 80% of people dnt know how to do bcoz we always depend upon select class..
@omkarpotdar2763
@omkarpotdar2763 2 жыл бұрын
Thank you very much Naveen to explain this topic in a smart and easy way. Keep it up Naveen😊
@divyarani9754
@divyarani9754 11 ай бұрын
Very nice explanation..which is in detail..i just subscribed your channel though its old its very useful now..
@surejmathewc8751
@surejmathewc8751 4 жыл бұрын
Hi Naveen, videos which your posting is very helpful and am referring your video to practice and expertise automation....really helpful
@madhusudandevaraju1207
@madhusudandevaraju1207 5 жыл бұрын
For the already selected options, we can't use isSelected() method. Because this method always returns false. So we have to use the li-class which changes the class name to "active" when the checkbox is selected. So we can select all the checkboxes without unselecting the already selected ones by using below logic. for (int i = 0; i < bsOptions.size(); i++) { if ((bsOptions.get(i).getAttribute("class").equalsIgnoreCase("active"))) { System.out.println(bsOptions.get(i).getText()); Thread.sleep(1000); } else bsOptions.get(i).click(); }
@umangsharma7447
@umangsharma7447 5 жыл бұрын
awesome bro !
@umangsharma7447
@umangsharma7447 5 жыл бұрын
As mentioned by madhu : - we have to get the list of elements as below ( i.e. till the li class) List elements = driver.findElements(By.xpath("//ul[contains(@class,'multiselect')]//li")); for (WebElement ele : elements) { System.out.println(ele.getAttribute("class").equalsIgnoreCase("active")); if(ele.getAttribute("class").equalsIgnoreCase("active")) { System.out.println(ele.getText()); } else { ele.click(); } }
@ramakrishnants7826
@ramakrishnants7826 4 жыл бұрын
Hello Sir, i was looking for a solution for this issue, thanks a lot for the comment
@Anaris13
@Anaris13 4 жыл бұрын
Great Thanks Naveen, this video helped me a lot, I paid attention you always sharing solution for most tricky cases. Again Thanks a lot .
@hanuman411
@hanuman411 4 жыл бұрын
Thank you naveen. it helped and worked great!
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
Glad it helped :)
@BunyiSordera
@BunyiSordera 2 жыл бұрын
You are a damn hero!
@poojapadmawar8977
@poojapadmawar8977 2 жыл бұрын
Hi Naveen.. What if we have select tag under the div tag. Its not working if I use select class over there. Can I use your method for bootstrap??
@amitgaigawali4606
@amitgaigawali4606 3 жыл бұрын
@Navin_AutomationLabs thanks, but i have one diffrent scenario. that is dropdown within dropdown. i.e. main tap is 'Financial' then it has three dropdown menu, then that each have other 4 dropdown. how can it be handle
@bsrinivas165
@bsrinivas165 6 жыл бұрын
Awesome explanation👌👌... Thank you 💐💐
@22Shoyab
@22Shoyab 5 жыл бұрын
Hi naveen can you tell me how to validate which options from. Dropdown are highlighted by default (bootstrap dropdown)
@amitbhardwaj7824
@amitbhardwaj7824 4 жыл бұрын
nice lecture plz keep uploading
@rajeshchowdary1615
@rajeshchowdary1615 5 жыл бұрын
Hi, Naveen your videos are very good, in this video I've doubt i.e once I clicked on the dropdown button I got 14 options as you said. And I want to select Angular so here I can use Dynamic XPath right i.e selecting the checkbox based on Angular element na .. here I'll inspect the independent element angular and dependent element checkbox... using XPath as ....... //label[text()=' Angular']/../../..//input[@value='Angular']
@varnaramkorepu7450
@varnaramkorepu7450 2 жыл бұрын
hi sir am following your channel for my preparation it is excellent and i got so much from your channel...can u plz guide me is this info is enough for 3 yrs exp candidates where i wanted to try my job search on 3 yrs experience.. prevoiusly i wrked in non-it sector will u guide me i hope ...👍👍👍
@meetnakrani4381
@meetnakrani4381 2 жыл бұрын
Use this method for calendar. It work
@debayankabiraj
@debayankabiraj 2 жыл бұрын
Hi Navin, Thank you for the Bootstrap dropdown. It helped, but i have a dropdown which scrolls down, and using your method i was only able to select visible items in the dropdown, it is not scrolling down to find an element, used javascript query to scrollTo view, but did not scroll, can you help with this?
@attitudelove4517
@attitudelove4517 2 жыл бұрын
Hi Naveen, How to automate the Material UI dropdown?
@jyotiprokashmondal1518
@jyotiprokashmondal1518 3 жыл бұрын
Nice tutorial. Please make another tutorial to handle angular js dropdown.
@Julyanajs
@Julyanajs 6 жыл бұрын
thanks for share, this video was very useful!
@theevenbit2754
@theevenbit2754 2 жыл бұрын
💌 excellent video
@rupjitdas8509
@rupjitdas8509 4 жыл бұрын
Hi @naveen, I have a doubt why cannot we directly do the click operation rather than getting all the webelements of the bootstrap drop down and adding the for loop to find the text and then click, I understand that in dynamic web table we need to do this but why it is needed here also
@dileepnaidu9610
@dileepnaidu9610 4 жыл бұрын
Hi Naveen I have same scenario where bootstrap dropdown having only "div" than nothing else. i have inspected on dropdown but found only div-class so unable to select dropdown items Could you please tell me how to handle such kind of dropdowns having only div class
@raghavibr7666
@raghavibr7666 4 жыл бұрын
Hi Navin, Can we use the same logic for Span class as well ? Please reply
@vijaysadanand5287
@vijaysadanand5287 4 жыл бұрын
@Raghavi Br I hope you have got the code for span class but below code worked for me where there is div and span tag included... driver.findElement(By.xpath("//div[contains(@class,'selected-dial-code')]")).click(); List list = driver.findElements (By.xpath("//div[contains(@class,'flag-container')]//ul//li//span[contains(@class,'dial-code')]")); System.out.println(list.size()); for (int i=0;i
@puneetpawar8494
@puneetpawar8494 2 жыл бұрын
Bro can you tell me how can I select random value on such a drop down
@sridevireddy1371
@sridevireddy1371 6 жыл бұрын
Thanks a ton...
@julyuser1030
@julyuser1030 4 жыл бұрын
Good
@v2factsand327
@v2factsand327 2 жыл бұрын
Thanks sir
@vijaybahadur5755
@vijaybahadur5755 6 жыл бұрын
That was really helpful.... Can you please make one tutorial is video for Jmeter 5.0 also...? Please because you have got awesome ability to explain.. I love ❤ the way you elaborate something. Thanks in advance.
@akulabhaskar3797
@akulabhaskar3797 6 жыл бұрын
Hello Naveen Can u share the link which u used
@pushpapacharya
@pushpapacharya 5 жыл бұрын
Can't I write //ul[contains(@class,'multiselect-container')]//li//a//label[contains(text(),'Angular')] directly to select the element and perform click operation instead getting list of label then selecting that element and performing click operation?
@edwindeepak6234
@edwindeepak6234 5 жыл бұрын
I also have the same doubt. Have you checked the xpath?
@bipinmnair007
@bipinmnair007 5 жыл бұрын
Yes you can use the same as well
@Anaris13
@Anaris13 4 жыл бұрын
If you want directly to click You can use //label[contains(text(),'Angular')] , but if your requirement is to validate all elements is thart dropDown you need to follow as Naveen did in video and store elements in List.
@syedatif837
@syedatif837 6 жыл бұрын
Hello Naveen- I have the same scenario where I need to select multiple options from the dropdrown but when I click on the dropdrown and try to find the xpath of the elements in the dropdown, it does not show the xpath of the elements. The ul tag for me is hidden and I got it after i pressed F12 in the UI. Its very difficult for me to capture the xpath of the dropdown elements as when i just come out of the dropdown list the ul gets hidden in html code
@thippeswamyss5202
@thippeswamyss5202 4 жыл бұрын
I am facing some issue in selecting value in bootstrap drop down , i cant even see the drop down values in HTML code . Please help me with this .
@TheNishi42
@TheNishi42 6 жыл бұрын
Thank you !!
@shaiksameena7603
@shaiksameena7603 6 жыл бұрын
Could you please how to edit drop-down values
@saikirantelapalli8785
@saikirantelapalli8785 6 жыл бұрын
Hello Naveen, what if i need to select multiple check boxes not all in the drop down and also its very difficult for me to capture the xpath of the dropdown elements as when i just come out of the dropdown list the ul gets hidden in html code
@smitanair5721
@smitanair5721 6 жыл бұрын
You can use the or || operator to select multiple values in the if condition.
@sabrinsabrin566
@sabrinsabrin566 6 жыл бұрын
How to write the code when select value which try to find out by index???
@syedatif837
@syedatif837 6 жыл бұрын
Select selectElement=new Select(); selectElement.selectByValue("value" ); here value is attribute of the options tag
@Anaris13
@Anaris13 4 жыл бұрын
You can past index as a argument to your method and while you are looping just do :--> if(i==arg){ List.get(i).click(); }
@tejastoley6714
@tejastoley6714 4 жыл бұрын
I use this customized xpath, List list = driver.findElements(By.xpath("//div[@class='dropdown show']//child::div")); System.out.println(list.size()); for(int i=0; i
@utlavamsi6976
@utlavamsi6976 6 жыл бұрын
Hiii guy's anyone recently faced interview for 3+experience guys. Which type questions you have faced at the time of interview pls pls guy's send me... Useful for everyone
@real_hello_kitty
@real_hello_kitty 4 жыл бұрын
😊🙏
@vishnuvlog8030
@vishnuvlog8030 4 жыл бұрын
you must need to show some different websites
How to use Selenium with Sikuli (Automate Flash Objects)
36:07
Naveen AutomationLabs
Рет қаралды 54 М.
Mystery of StaleElementReferenceException in Selenium WebDriver
18:10
Naveen AutomationLabs
Рет қаралды 51 М.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 69 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 30 МЛН
Handling of Bootstrap Dropdowns using #Selenium WebDriver | Selenium |
37:03
How to Handle Bootstrap Dropdown in Selenium Webdriver
20:31
Mukesh otwani
Рет қаралды 101 М.
Actions Class In Selenium : MouseMovement || Right Click || Drag & Drop
39:33
Naveen AutomationLabs
Рет қаралды 59 М.
Handling of HTML Dropdown Using Selenium WebDriver
23:33
H Y R Tutorials
Рет қаралды 18 М.
JavaScriptExecutor With Selenium WebDriver - Session 12
43:10
Naveen AutomationLabs
Рет қаралды 112 М.
How to handle Permission Pop-ups using Selenium WebDriver | Selenium |
29:05
Handle Drop Down using Select class in Selenium || Classroom Training Session
57:19
How to Handle Dropdown in Selenium webdriver
31:43
Mukesh otwani
Рет қаралды 204 М.
What are GetWindowHandle and GetWindowHandles in Selenium? | Selenium Basics
12:42
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН