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("")
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 """
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
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..
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
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?
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.
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
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:
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"}
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.
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'))"
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?
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
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)
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)
once, the 'departing' date is entered, the website automatically enters the same date in 'returning' date. So the input provided by selenium is ignored.
@@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
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"))
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("")
Thanks mate really usefull
@@entochacko2164 Cheers!
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
"""
Thanks for the clear cut explanation of Explicit waits :)
Welcome
Really Nice.. You are teaching so perfectly. Thanks for Knowledge sharing..
Welcome
I have been following your tutorial for a long time. Very good, I want selenium captcha bypass tutorial
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
Thanks for great explanation of explicit wait, the story of two friends in the end kills it!!!! :D
Welcome
Amazing stuff sir
Keep watching
Good Work
Thanks
amazing
Best for the beginners
Thanks
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..
Very helpful
Thanks
amazing!!
Thanks!!
Sir, the departure date and the return date are the same after running the program. How to change the return date?
Great
Thanks
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
I too face the same issue, for SFO it writes "FO" or just "O". What is the way to fix this?
me too faced it. added time.sleep(5)
@@TheUkr1244 add a space before the characters you send
by learning all of this videos of selenium with python, will i be able to get a selenium job?
How to select value from autosuggestion??
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?
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.
@@sdetpavan thank you sir
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
I get the issue send_keys for autosuggestion.
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 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:
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"}
same
@@gavishyadav2932 use EC.presence_of_element_located
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.
where can I find selenium with python official page
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'))"
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?
Hello sir
when I use WebdriverWait () getting error "Unresolved reference 'WebdriverWait' " please help
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
element_obj = waitObj.until(ExpecObj.element_to_be_clickable((By.XPATH,"//*[@id='stopFilter_stops-0']"))) Try this maybe ?
element=wait.until(EC.element_to_be_clickable, driver.find_element_by_xpath("//input[@id='stopFilter_stops-0']"))
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)
You did to replace " " with ' ' inside of the xpath link.
Make it "//[@id='input-3']" instead of "//[@id="input-3"]"
23:33
Nice explanation, but there are annoying sounds on you, it brought any headache
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)
Да кто-нибудь, ВКЛЮЧИТЕ СУБТИТРЫ БЛЯТЬ.
Why its taking departure date and returning date same ?
once, the 'departing' date is entered, the website automatically enters the same date in 'returning' date. So the input provided by selenium is ignored.
@@harishM77 But we did clear the field before entering the data, isn't it?
@@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
@@jonnyfrost3676 thats a good trick. Thanks.
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"))