Selenium with Python Tutorial 7-WebDriver Explicit wait

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 64

  • @sridipta
    @sridipta 5 ปีที่แล้ว +12

    Very nice video.
    Just wanted to point out that your intended action is not working for the "returning date" field. Check the video for reference. After you fill in the departure date and then move to the returning date box, it autofills the field and the clear() statement is not able to remove it. It's a known issue in case of auto correction. Hence your departure and return date are becoming same though we are sending keys for different dates. Following would fix the problem:
    returnDate = driver.find_element(By.ID, "flight-returning-hp-flight")
    returnDate.send_keys(Keys.CONTROL + "a", Keys.DELETE)
    returnDate.send_keys("")

    • @entochacko2164
      @entochacko2164 5 ปีที่แล้ว

      Thanks mate really usefull

    • @sridipta
      @sridipta 5 ปีที่แล้ว

      @@entochacko2164 Cheers!

    • @codeb3nder862
      @codeb3nder862 5 ปีที่แล้ว

      So that means ctrl + a will select the whole field and then delete will clear the field. I happen to see the implementation of the clear()
      def clear(self):
      """Clears the text if it's a text entry element."""
      self._execute(Command.CLEAR_ELEMENT)
      and the macro CLEAR_ELEMENT is imported from command.py and it says
      """
      Defines constants for the standard WebDriver commands.
      While these constants have no meaning in and of themselves, they are
      used to marshal commands through a service that implements WebDriver's
      remote wire protocol:
      github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
      """

  • @RX-Ani
    @RX-Ani 3 ปีที่แล้ว +2

    Thanks for the clear cut explanation of Explicit waits :)

  • @sachinchavan1361
    @sachinchavan1361 4 ปีที่แล้ว +1

    Really Nice.. You are teaching so perfectly. Thanks for Knowledge sharing..

  • @siraj.udlla_
    @siraj.udlla_ ปีที่แล้ว

    I have been following your tutorial for a long time. Very good, I want selenium captcha bypass tutorial

  • @mudassiraijaz6892
    @mudassiraijaz6892 4 ปีที่แล้ว +3

    hello sir, i want to start my career in software testing so i started with your tutorials like selenium with python and i am following from the very beginning.Now i have understood these selenium automation thoroughly.Now what should be the next step i must take i order to carry forward.Kindly guide me

  • @p-a5603
    @p-a5603 5 ปีที่แล้ว +2

    Thanks for great explanation of explicit wait, the story of two friends in the end kills it!!!! :D

  • @zubairshaikh8444
    @zubairshaikh8444 2 ปีที่แล้ว +1

    Amazing stuff sir

    • @sdetpavan
      @sdetpavan  2 ปีที่แล้ว +1

      Keep watching

  • @talibhussain267
    @talibhussain267 5 ปีที่แล้ว +4

    Good Work

  • @shabbirahmed9734
    @shabbirahmed9734 3 ปีที่แล้ว +2

    amazing

  • @talibhussain267
    @talibhussain267 5 ปีที่แล้ว +3

    Best for the beginners

  • @rajkumargerard5474
    @rajkumargerard5474 4 ปีที่แล้ว +1

    Hello Sir thanks got the video... It's was really helpful.. request you to make a video on Date picker... I'm having difficult to handle this. I was requested to write a code which will accept date from user and select the same from date picker..

  • @snehalpeherkar9418
    @snehalpeherkar9418 5 ปีที่แล้ว +4

    Very helpful

  • @shaharrefaelshoshany9442
    @shaharrefaelshoshany9442 3 ปีที่แล้ว +2

    amazing!!

  • @mohitnayal7540
    @mohitnayal7540 5 ปีที่แล้ว +4

    Sir, the departure date and the return date are the same after running the program. How to change the return date?

  • @upaale
    @upaale 4 ปีที่แล้ว +1

    Great

  • @entochacko2164
    @entochacko2164 5 ปีที่แล้ว +3

    Thank you for all videos.Really helpful. Just a doubt, while running, some time it misses characters. eg- for "SFO" it writes "SF" or "FO" . Is there any way to fix it? Thanks

    • @Saravanan-tb2dk
      @Saravanan-tb2dk 5 ปีที่แล้ว +1

      I too face the same issue, for SFO it writes "FO" or just "O". What is the way to fix this?

    • @TheUkr1244
      @TheUkr1244 5 ปีที่แล้ว

      me too faced it. added time.sleep(5)

    • @souravbethi8264
      @souravbethi8264 4 ปีที่แล้ว

      @@TheUkr1244 add a space before the characters you send

  • @samuelbrown6011
    @samuelbrown6011 5 ปีที่แล้ว +1

    by learning all of this videos of selenium with python, will i be able to get a selenium job?

  • @mdpervez2897
    @mdpervez2897 4 ปีที่แล้ว +2

    How to select value from autosuggestion??

  • @snehalpeherkar9418
    @snehalpeherkar9418 5 ปีที่แล้ว +2

    Can you add video for all types of locators? Everytime copying xpath doesn't work ,we have to create explicitly.. Also how to locate or create css selectors?

    • @sdetpavan
      @sdetpavan  5 ปีที่แล้ว +2

      Please watch below recordings.
      th-cam.com/video/lqBmcDu-79k/w-d-xo.html
      th-cam.com/video/SeooAlZe0kU/w-d-xo.html
      th-cam.com/video/dhFiU3vqenU/w-d-xo.html
      Locators are same in Selenium. It can be java or Python.

    • @snehalpeherkar9418
      @snehalpeherkar9418 5 ปีที่แล้ว +1

      @@sdetpavan thank you sir

  • @deepakdesai5290
    @deepakdesai5290 5 ปีที่แล้ว

    Hello Sir, the videos are very helpful, I am very much new to programming and here when you inspect the element i am not able to view the element , not able identify or view the elements ex, by name, by id the inspect info will not be clear

  •  4 ปีที่แล้ว +2

    I get the issue send_keys for autosuggestion.

  • @MDNaushad-vh4fm
    @MDNaushad-vh4fm ปีที่แล้ว

    Sir, if the element is not found within the maximum time specified in the explicit wait condition then what would happen? Will it give exception ?

  • @hey_abhiraj
    @hey_abhiraj 3 ปีที่แล้ว +1

    Hey please reply
    I am getting some errors
    While login to website with selenium which have preloader.
    raise TimeoutException(message, screen, stacktrace)
    selenium.common.exceptions.TimeoutException: Message:

  • @vasanth23
    @vasanth23 5 ปีที่แล้ว +3

    I am getting this error when I run. 4 out of 5 times it fails due to raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='gcw-flights-form-hp-flight']/div[8]/label/button"}

    • @gavishyadav2932
      @gavishyadav2932 4 ปีที่แล้ว +1

      same

    • @fortznite8150
      @fortznite8150 3 ปีที่แล้ว

      @@gavishyadav2932 use EC.presence_of_element_located

  • @AznBMan75
    @AznBMan75 2 ปีที่แล้ว

    Hi sir! How would I do a wait after I manually login, and pass through a few security pages then to the page that I want automate. The program will get to the front page, and then wait for me to login through 4 security pages. And, then it finally lands on the page that I want to automate, and then it will click on "href" or title of the element of the page to open a new tab page.

  • @dushyantkumar4704
    @dushyantkumar4704 4 ปีที่แล้ว +1

    where can I find selenium with python official page

  • @saggy2299
    @saggy2299 5 ปีที่แล้ว +1

    Hello Sir, I was trying to execute the above code. I'm getting below error. I have also increased the sleep time but still getting below error ERROR -" data = self._sock.recv(self._rbufsize)
    urllib3.exceptions.ProtocolError: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))"

  • @naaffzz
    @naaffzz 3 ปีที่แล้ว

    Sir, I followed the steps and it run successfully some times, but sometime it got error without change any code.
    Also noted that the date of departure and return might be change while run the program.
    How to resolve this?

  • @akshaynaik6038
    @akshaynaik6038 2 ปีที่แล้ว

    Hello sir
    when I use WebdriverWait () getting error "Unresolved reference 'WebdriverWait' " please help

  • @vasanth23
    @vasanth23 5 ปีที่แล้ว +2

    element_obj = waitObj.until(ExpecObj.element_to_be_clickable(By.XPATH,"//*[@id='stopFilter_stops-0']"))
    BUT I am getting error...
    element_obj = waitObj.until(ExpecObj.element_to_be_clickable(By.XPATH,"//*[@id='stopFilter_stops-0']"))
    TypeError: __init__() takes 2 positional arguments but 3 were given

    • @reenaronanki
      @reenaronanki 5 ปีที่แล้ว

      element_obj = waitObj.until(ExpecObj.element_to_be_clickable((By.XPATH,"//*[@id='stopFilter_stops-0']"))) Try this maybe ?

    • @biplob2071
      @biplob2071 5 ปีที่แล้ว

      element=wait.until(EC.element_to_be_clickable, driver.find_element_by_xpath("//input[@id='stopFilter_stops-0']"))

  • @sriman8083
    @sriman8083 4 ปีที่แล้ว +1

    sir after loading the web page it will show the following error.
    sir please respond i stuck here and unable to move forward selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="input-3"]"}
    (Session info: chrome=83.0.4103.97)

    • @ilyasovlyakuliev4638
      @ilyasovlyakuliev4638 3 ปีที่แล้ว

      You did to replace " " with ' ' inside of the xpath link.
      Make it "//[@id='input-3']" instead of "//[@id="input-3"]"

  • @naufalhafidz6760
    @naufalhafidz6760 4 ปีที่แล้ว

    23:33

  • @arefmohammed4253
    @arefmohammed4253 2 ปีที่แล้ว

    Nice explanation, but there are annoying sounds on you, it brought any headache

  • @ashutoshverma8164
    @ashutoshverma8164 2 ปีที่แล้ว

    I am unable to import by class..showing the below error. Please somebody help me..please..
    from selenium.webdriver.common.by import by
    ImportError: cannot import name 'by' from 'selenium.webdriver.common.by' (C:\Python3.10.2\lib\site-packages\selenium\webdriver\common\by.py)

  • @НеизвестныйЧеловек-б8щ
    @НеизвестныйЧеловек-б8щ 2 ปีที่แล้ว

    Да кто-нибудь, ВКЛЮЧИТЕ СУБТИТРЫ БЛЯТЬ.

  • @ashishkongari7936
    @ashishkongari7936 5 ปีที่แล้ว +2

    Why its taking departure date and returning date same ?

    • @harishM77
      @harishM77 5 ปีที่แล้ว

      once, the 'departing' date is entered, the website automatically enters the same date in 'returning' date. So the input provided by selenium is ignored.

    • @log2anu
      @log2anu 5 ปีที่แล้ว

      @@harishM77 But we did clear the field before entering the data, isn't it?

    • @jonnyfrost3676
      @jonnyfrost3676 5 ปีที่แล้ว

      @@log2anuTry to use driver.find_element(By.ID, "flight-returning-hp-flight").send_keys(Keys.CONTROL+"a") instead clear() method from selenium. It's worked. Class Keys emulates hot keys your on your keyboard

    • @log2anu
      @log2anu 5 ปีที่แล้ว

      @@jonnyfrost3676 thats a good trick. Thanks.

  • @papaoh5902
    @papaoh5902 2 ปีที่แล้ว

    I have one question about WebDriverWait.
    EC.presence_of_element_located((By.XPATH, "/html/body/div[2]/div[5]/div/div[2]/div/form/div/div[1]/div/a/img"))