Python Forum
python 3.x and selenium. Service unexpectedly exited
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python 3.x and selenium. Service unexpectedly exited
#1
Hallo. I'll get
Error:
ERROR - Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
, if I try to run open_hyperlink_1 function. Also, first and fourth element in cycle load correctly. When I try run function without cycle all links will be opened correctly
def open_hyperlink_1(inp, end = ''):
op_log = logging.getLogger("root.open_hyperlink_1")
op_log.debug('*' + 'some_site_name'+end + '*')
try:
    driver = webdriver.Safari()
    driver.get('some_site_name' + end)
    select =driver.find_element_by_xpath('//div[@class="outcomesBlock firstBlock"]//ul')
    link_text = select.get_attribute("outerHTML")
    op_log.info('link opened')
    op_log.info('loading bets')
    print('+')
    driver.close()
    del driver
except Exception as E:
    op_log.error(E)
    print('-')

for i in link:
    open_hyperlink_1(inp, i)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to access a web service from a python script? dangermaus33 6 3,150 Dec-04-2020, 07:04 AM
Last Post: dangermaus33
  Creating a RESTful web service and web service client dangermaus33 0 1,263 Dec-01-2020, 09:56 PM
Last Post: dangermaus33
  Service Now CSV Export Redirection Python mavecnirp 1 2,773 Jul-24-2018, 04:09 PM
Last Post: nilamo
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,607 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020