Selenium New Py user and I'm not sure what went wrong.
Microsoft Windows [Version 10.0.14393]
C:\Users\Richard\Documents\Testsite\CraigLister\gmail>python craiglister.py
listingFolder C:\Users\Richard\Documents\Testsite\CraigLister\gmail\listings\xxxxxxxxx
listingImages ['2017-01-03-PHOTO-00004803.jpg', '2017-01-03-PHOTO-00004804.jpg', '2017-01-03-PHOTO-00004805.jpg', '2017-01-03-PHOTO-00004806.jpg', '2017-01-03-PHOTO-00004808.jpg', '2017-01-03-PHOTO-00004809.jpg', '2017-01-03-PHOTO-00004810.jpg', '2017-01-03-PHOTO-00004811.jpg', '2017-01-03-PHOTO-00004812.jpg', '2017-01-03-PHOTO-00004813.jpg', '2017-01-03-PHOTO-00004814.jpg', '2017-01-03-PHOTO-00004815.jpg', '2017-01-03-PHOTO-00004816.jpg', '2017-01-03-PHOTO-00004817.jpg', '2017-01-03-PHOTO-00004818.jpg', '2017-01-03-PHOTO-00004819.jpg', '2017-01-03-PHOTO-00004820.jpg', '2017-01-03-PHOTO-00004821.jpg', '2017-01-03-PHOTO-00004822.jpg', 'Thumbs.db']
Traceback (most recent call last):
File "craiglister.py", line 241, in <module>
postListing(listing)
File "craiglister.py", line 120, in postListing
clickListingType(listing)
File "craiglister.py", line 65, in clickListingType
listing.driver.find_element_by_xpath("//*[@id='pagecontainer']/section/form/blockquote//label[contains(.,'" + listing.type + "')]/input").click()
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 293, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 752, in find_element
'value': value})['value']
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
self.error_handler.check_response(response)
**File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='pagecontainer']/section/form/blockquote//label[contains(.,'service offered')]/input"}
(Session info: chrome=56.0.2924.87)
(Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.14393 x86_64)**
looks like craigslist may have shaked things up or selenium isnt able to identify elements properly. My laptop sucks and wifi is slow so ill keep checking if its just me.
Looks like Selenium couldn't find the element. Perhaps Craigslist website has changed or your city has a different workflow than the city this was developed for.
Nicholas Smith Software Engineer In Test
www.clickthisnick.com http://clickthisnick.com/
On Fri, Feb 17, 2017 at 10:15 PM, rndichu [email protected] wrote:
Microsoft Windows [Version 10.0.14393]
C:\Users\Richard\Documents\Testsite\CraigLister\gmail>python craiglister.py listingFolder C:\Users\Richard\Documents\Testsite\CraigLister\gmail\listings\xxxxxxxxx listingImages ['2017-01-03-PHOTO-00004803.jpg', '2017-01-03-PHOTO-00004804.jpg', '2017-01-03-PHOTO-00004805.jpg', '2017-01-03-PHOTO-00004806.jpg', '2017-01-03-PHOTO-00004808.jpg', '2017-01-03-PHOTO-00004809.jpg', '2017-01-03-PHOTO-00004810.jpg', '2017-01-03-PHOTO-00004811.jpg', '2017-01-03-PHOTO-00004812.jpg', '2017-01-03-PHOTO-00004813.jpg', '2017-01-03-PHOTO-00004814.jpg', '2017-01-03-PHOTO-00004815.jpg', '2017-01-03-PHOTO-00004816.jpg', '2017-01-03-PHOTO-00004817.jpg', '2017-01-03-PHOTO-00004818.jpg', '2017-01-03-PHOTO-00004819.jpg', '2017-01-03-PHOTO-00004820.jpg', '2017-01-03-PHOTO-00004821.jpg', '2017-01-03-PHOTO-00004822.jpg', 'Thumbs.db'] Traceback (most recent call last): File "craiglister.py", line 241, in
postListing(listing) File "craiglister.py", line 120, in postListing clickListingType(listing) File "craiglister.py", line 65, in clickListingType listing.driver.find_element_by_xpath("//[@id='pagecontainer']/section/form/blockquote//label[contains(.,'" + listing.type + "')]/input").click() File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 293, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 752, in find_element 'value': value})['value'] File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute self.error_handler.check_response(response) **File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//[@id='pagecontainer']/section/form/blockquote//label[contains(.,'service offered')]/input"} (Session info: chrome=56.0.2924.87) (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.14393 x86_64)** looks like craigslist may have shaked things up or selenium isnt able to identify elements properly. My laptop sucks and wifi is slow so ill keep checking if its just me.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/clickthisnick/CraigLister/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/AHfcVVpLjM6WNcarUaN5BjLdzkKMvIttks5rdmJbgaJpZM4ME-Kd .
@rndichu Did you solve this? I am having the same issue.
nope. i trying to rewrite it drunk from the ground up. harder than i thought.
I've implemented a super specific fix for my use case. I can send to you if you'd like :)
On Apr 1, 2017, at 4:59 PM, rndichu [email protected] wrote:
nope. i trying to rewrite it drunk from the ground up. harder than i thought.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
That would be great
On Apr 1, 2017 8:48 PM, "Alexi Robbins" [email protected] wrote:
I've implemented a super specific fix for my use case. I can send to you if you'd like :)
On Apr 1, 2017, at 4:59 PM, rndichu [email protected] wrote:
nope. i trying to rewrite it drunk from the ground up. harder than i thought.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/clickthisnick/CraigLister/issues/7#issuecomment-290958982, or mute the thread https://github.com/notifications/unsubscribe-auth/AVfdv-Oy_PzGh9_NhkmDMbe6Ha9cjzENks5rrv5lgaJpZM4ME-Kd .
listingImages ['1.jpg', '2.jpeg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg']
Traceback (most recent call last):
File "craiglister-old.py", line 241, in
I saw you guys had the same problem, someone fixed this problem ? new using selenium and python I can't find where is the problem.