I have a script to upload a file to the site, nothing happens when i launch it, I thought the problem was in the compatibility of chromedriver and the browser, but the driver update did not give a result, the script does not issue errors, launching on pycharm outputs "Process finished with exit code 0", i used logging, it shows that the connection is normal, the path according to the site, it also seems to be spelled out correctly. Tell me please what the problem may be.
from seleniumbase import BaseCase
import time
from datetime import datetime
import logging
import os
from seleniumbase import get_driver
driver = get_driver("chrome")
file_path = os.path.abspath("file.xlsx")
logging.basicConfig(level=logging.INFO, filename="py_log.log", format='%(asctime)s - %(levelname)s - %(message)s')
logging.info('The script is starting to run')
class MyTestClass(BaseCase):
def test_visible_upload(self):
self.driver = driver
self.open("https://site/")
#time.sleep(2)
self.refresh()
#time.sleep(2)
self.refresh()
#time.sleep(2)
self.type('#ke-form-field-input-0', 'login')
#time.sleep(1)
self.type('#ke-form-field-input-1', 'password')
#time.sleep(5)
self.click('body > kn-app > kn-auth > kn-auth-sign-in > kn-auth-sign-in-form > form > button')
title = self.get_title()
print(title)`
#Here tried to get site`s title but it didn`t work
`self.choose_file('#kpp-app > div.body > div > div.content-side > div > div.content > div > div.cs-section > div > div > label > div > input[type=file]', file_path)`
#File upload string.
i expect not empty result when launch it