I am trying to use scrapyd with scrapy. When I use this the code below it works fine. But when I use it with selenium, it doesn’t My spider never runs. In jobs it gets listed under finished, and on error log I see exceptions.TypeError: __init__() got an unexpected keyword argument ‘_job’. Here is the full error log What do
Tag: selenium
Selenium give file name when downloading
I am working with a selenium script where I am trying to download a Excel file and give it a specific name. This is my code: Is there anyway that I can give the file being downloaded a specific name ? Code: Answer You cannot specify name of download file through selenium. However, you can download the file, find the
How to exit dropdown menu in selenium webdriver
I am using selenium webdriver with Chrome. I am able to select item from dropdown menu and it works fine. But it there is no item in dropdown items after that I cannot select any other field. I put this is try catch block so it goes to next steps. If I try to select other field and sendKeys it
Can a website detect when you are using Selenium with chromedriver?
I’ve been testing out Selenium with Chromedriver and I noticed that some pages can detect that you’re using Selenium even though there’s no automation at all. Even when I’m just browsing manually just using Chrome through Selenium and Xephyr I often get a page saying that suspicious activity was detected. I’ve checked my user agent, and my browser fingerprint, and
Selenium: How to Inject/execute a Javascript in to a Page before loading/executing any other scripts of the page?
I’m using selenium python webdriver in order to browse some pages. I want to inject a javascript code in to a pages before any other Javascript codes get loaded and executed. On the other hand, I need my JS code to be executed as the first JS code of that page. Is there a way to do that by Selenium?
Parsing html using Selenium – class name contains spaces
I’m trying to parse some html using Selenium. The problem is that it raises error in case the class name contains spaces. Here is the tag I’m searching for: <p class=”p0 ng-binding”>text</p> I’ve tried these two options: Could anybody give me a hint? Answer The p element has two classes: p0 and ng-binding. Try this selector:
Slow scrolling down the page using Selenium
I’m trying to scrape some data from flight search page. This page works this way: You fill in a form and then you click on the button search – this is ok. When you click the button you are redirected to the page with results and here is the problem. This page is adding continuously results for example for one
Error message: “‘chromedriver’ executable needs to be available in the path”
I am using selenium with python and have downloaded the chromedriver for my windows computer from this site: http://chromedriver.storage.googleapis.com/index.html?path=2.15/ After downloading the zip file, I unpacked the zip file to my downloads folder. Then I put the path to the executable binary (C:UsersmichaelDownloadschromedriver_win32) into the Environment Variable “Path”. However, when I run the following code: … I keep getting the
How to get a list of the elements in an with Selenium using Python?
I’m using Selenium WebDriver using Python for UI tests and I want to check the following HTML: From this unordered list I want to loop over the elements and check the text in them. I selected the ul-element by its id, but I can’t find any way to loop over the <li>-children in Selenium. Does anybody know how you can
How to find parent elements by python webdriver?
Is there any methods for python+selenium to find parent elements, brother elements, or child elements just like driver.find_element_parent? or driver.find_element_next? or driver.find_element_previous? eg: I’ve tried like below, but fail: How can I get the parent of input element and then, finally, get the option selected? Answer You can find a parent element by using .. xpath: What about making a