I am trying to enter text in “keywords” section using send keys command. Please find my below code. Answer There are two elements with same id I used driver.find_elements_by_id(“keywords”) method to get all of them as a list and i accessed the required using index number
Tag: selenium
Splitting list of strings based on a character in each string ( Python )
So i have a list of strings that looks like this : This is how the list is generated and made readable (“video” is a list of selenium webelements ) : What i want to do is SPLIT this list into two other lists based on ONE specific character in each element like so : My end goal is to
Find Elements Between Div With Selenium in Python
I have the following HTML code, I want to extract Years and names, I tried everything with no success : What I want to get is : I tried the following, using xpath I got : 2019 2020 name1 name2 name3 name4 name5 name6 Answer You can get them using xpath and preceding: {‘name1’: ‘2019’, ‘name2’: ‘2019’, ‘name3’: ‘2019’, ‘name4’:
How to set options for chromium Edge() in Selenium?
I have been following tutorials, and I came up on Firefox, and using Options(), I could set headless mode while defining browser (browser = Firefox(options=opts)), but for Firefox only. I downloaded the driver for the new chromium Edge, but I cannot seem to set the options= keyword in Edge(). Can anyone tell me how do I set the options while
How to extract the URL of a webpage without knowing beforehand?
I’m trying to make an iterative web search that pulls up a google search page ONLY when it needs to. Therefore, I don’t know the URLs ahead of time. I am aware of the .current_url argument from Selenium but it does not give me what I want. When I do print(driver.current_url) I only get https://www.google.com/ but I want to extract
Unable to locate text from web page using Selenium
I am trying to scrape amazon reviews for a certain product, but I am unable to locate the text for the ratings using selenium. But the same thing is easily scraped using soup. Link to page: https://www.amazon.in/BenQ-inch-Bezel-Monitor-Built/product-reviews/B073NTCT4R/ref=cm_cr_arp_d_paging_btm_next_2?ie=UTF8&reviewerType=all_reviews&pageNumber=39 Here is my code using Soup: ##Output 4.3 5.0 1.0 5.0 2.0 4.0 1.0 5.0 5.0 5.0 5.0 5.0 5.0 Here is my
How to click button in pop up window using python-selenium
I’m working to automate web page where i’m unable to close the pop up. I have tried to refresh/switch to pop up window, nothing worked. Code: If you want directly go to web page, https://buy.libertymutual.com/auto?city=Somersworth&jurisdiction=NH&lob=Auto&policyType=Auto&zipCode=03878 Answer Replace last 3 lines of your code by below lines.Used action chain to click.
Submitting reCAPTCHA v2 with selenium and python – no form submit button
So I recently signed up with anti-captcha and have been testing with the https://github.com/ad-m/python-anticaptcha/blob/master/examples/recaptcha_selenium.py script. I cannot get past a reCAPTCHA that has no submit button (hidden or visible) nor a clear way to submit for verification. I’ve used the anti-captcha firefox plugin, so I know it can be passed. But I am stuck at the point of doing this
Using Tkinter, Threading and After method
im working on a selenium project using tkinter in python. I want to execute many selenium task at one time(could be up to 100), so I used threading to accomplish this goal, but I came to a problem, due to the fact that I need all individual selenium task to wait a couple seconds between instructions, I used the ‘.after’
How to know scroll bar is at end in selenium python
I am implementing a while loop in selenium, and want to condition my while loop, so when the scroll bar is at its end of its scroll the while loop should stop. How can i code this type of condition in while loop? Iam using Keys.DOWN and my while loop is right now set to True My code of while