I just don't get it that how can someone dislike this video. Amazingly explained Naveen, keep helping all of us by making such videos. Thank you so much :)
Superb explanation everything is clear about ...how to create Drop-Down list for Multi Selection.This question was asked me one of the interview at time I could not give them such a answer which can satisfied to the panel. Thanks Naveen !!
for k in range(len(value)): if ele.text == value[k]: ele.click() -> if ele.text in value: ele.click() - you don't need iteration over value-list, just use "in"
Superlike for the way you teach us . And generic method 👍 . In this generic method just change drop_list to optionlist in generic method line no 11 Correct me if I am wrong 🙏 Thank you again Naveen
Hi Naveen, in my case "for loop" only prints the first value from drop down and exits, it doesn't move forward and print all values available on drop down menu. What would be the solution to this.
when i am trying to use all options to check all the checkboxes ,the selection stops at option 4 giving exception that after option 4 - is not clickable at point (508, 527) , the window is showing only till option 4 and the code is not able to scroll down.
@@naveenautomationlabs I think the code for the multiple drop down could be shortened to import time from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager def select_values(options_list, value): for element in options_list: if element.text in value: element.click() driver = webdriver.Chrome(ChromeDriverManager().install()) driver.implicitly_wait(6) driver.get("www.jqueryscript.net/demo/Drop-Down-Combo-Tree/") driver.maximize_window() time.sleep(4) driver.find_element_by_id("justAnInputBox").click() time.sleep(3) drop_list = driver.find_elements_by_css_selector("span.comboTreeItemTitle") values_list: list = ["choice 2", "choice 3", "choice 6 2 1"] select_values(drop_list, values_list) time.sleep(6) The above code works perfectly fine
This xpath get only the elements from multi selection drop_list = driver.find_elements(By.XPATH, '//h3[text()="Multi Selection"]/..//span[@class="comboTreeItemTitle"]')
I just don't get it that how can someone dislike this video. Amazingly explained Naveen, keep helping all of us by making such videos. Thank you so much :)
Superb explanation everything is clear about ...how to create Drop-Down list for Multi Selection.This question was asked me one of the interview at time I could not give them such a answer which can satisfied to the panel.
Thanks Naveen !!
for k in range(len(value)):
if ele.text == value[k]:
ele.click()
->
if ele.text in value:
ele.click()
- you don't need iteration over value-list, just use "in"
You are the True inspiration for learners..
Superlike for the way you teach us . And generic method 👍 . In this generic method just change drop_list to optionlist in generic method line no 11
Correct me if I am wrong 🙏
Thank you again Naveen
Nice tutorial, i never see anywhere these details
Superb explanation Naveen,I loved it
Welcome back
Hi Naveen, in my case "for loop" only prints the first value from drop down and exits, it doesn't move forward and print all values available on drop down menu. What would be the solution to this.
One question. What happens when someone pass empty list. I tried in my code and I got "list index out of range" exception. How can we handle that?
Great work 👍🏼
when i am trying to use all options to check all the checkboxes ,the selection stops at option 4 giving exception that after option 4 - is not clickable at point (508, 527) , the window is showing only till option 4 and the code is not able to scroll down.
can we some sample websites practice the JQuery select options?
I am looking for Selenium Automation course. Please share fee s details
@6 if CSS is finding 45 elements then why it printing only 15?? why not for other dropdown option printing?
Because they are hidden and have no text.
@@naveenautomationlabs Thanks for quick reply .. Got it :)
@@naveenautomationlabs I think the code for the multiple drop down could be shortened to
import time
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
def select_values(options_list, value):
for element in options_list:
if element.text in value:
element.click()
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.implicitly_wait(6)
driver.get("www.jqueryscript.net/demo/Drop-Down-Combo-Tree/")
driver.maximize_window()
time.sleep(4)
driver.find_element_by_id("justAnInputBox").click()
time.sleep(3)
drop_list = driver.find_elements_by_css_selector("span.comboTreeItemTitle")
values_list: list = ["choice 2", "choice 3", "choice 6 2 1"]
select_values(drop_list, values_list)
time.sleep(6)
The above code works perfectly fine
@@amblessed_onwumere how to write this in java
This xpath get only the elements from multi selection
drop_list = driver.find_elements(By.XPATH, '//h3[text()="Multi Selection"]/..//span[@class="comboTreeItemTitle"]')