Handle JQuery Multi Select Drop Down (Interview Question) - Selenium Python - Part 5

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 21

  • @tempa-l4f
    @tempa-l4f 4 года назад +1

    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 :)

  • @ashuiet
    @ashuiet 4 года назад

    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 !!

  • @alexeyk8680
    @alexeyk8680 2 года назад +2

    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"

  • @anushapattan9638
    @anushapattan9638 4 года назад +2

    You are the True inspiration for learners..

  • @vikrantshingne8761
    @vikrantshingne8761 3 года назад +1

    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

  • @Psudeep
    @Psudeep 4 года назад +2

    Nice tutorial, i never see anywhere these details

  • @karthikpatil9509
    @karthikpatil9509 4 года назад

    Superb explanation Naveen,I loved it

  • @anushapattan9638
    @anushapattan9638 4 года назад +1

    Welcome back

  • @sovsrick
    @sovsrick 4 года назад +1

    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.

  • @samkitshah616
    @samkitshah616 2 года назад

    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?

  • @XboxPlayShorts
    @XboxPlayShorts 4 года назад

    Great work 👍🏼

  • @mahak64
    @mahak64 3 года назад

    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.

  • @aswinkumar594
    @aswinkumar594 4 года назад

    can we some sample websites practice the JQuery select options?

  • @sakthivelperiyasamy636
    @sakthivelperiyasamy636 4 года назад +1

    I am looking for Selenium Automation course. Please share fee s details

  • @gauravgupta1012
    @gauravgupta1012 4 года назад

    @6 if CSS is finding 45 elements then why it printing only 15?? why not for other dropdown option printing?

    • @naveenautomationlabs
      @naveenautomationlabs  4 года назад +1

      Because they are hidden and have no text.

    • @gauravgupta1012
      @gauravgupta1012 4 года назад

      @@naveenautomationlabs Thanks for quick reply .. Got it :)

    • @amblessed_onwumere
      @amblessed_onwumere 4 года назад

      @@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

    • @sayantanbasu1579
      @sayantanbasu1579 3 года назад

      @@amblessed_onwumere how to write this in java

  • @aldomaximilianosandovalbra8935
    @aldomaximilianosandovalbra8935 2 месяца назад

    This xpath get only the elements from multi selection
    drop_list = driver.find_elements(By.XPATH, '//h3[text()="Multi Selection"]/..//span[@class="comboTreeItemTitle"]')