I remowed your code as it containt login info.
Here is code without login info.
Here is code without login info.
from xml.etree.ElementTree import fromstring import requests from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver import Keys from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager from generic.Login import Login from lxml import html, etree from xml.etree import ElementTree as ET options = Options() options.add_experimental_option("detach", True) driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) class AIS_Import(Login): Login.login_func(driver, "https://www.thyme-it.net/aep2/sadlist/sadlist.html", "thymeit", "xxxx", "xxxx") '''Navigate to AIS Import template''' driver.find_element("xpath", "/html/body/div/div[3]/ul/li[1]/a").click() driver.find_element("xpath", "/html/body/div/div[3]/ul/li[1]/ul/li[2]/a").click() driver.find_element("xpath", "//a[text()= 'AIS Import']").click() '''Click on the first template(should be AUTO:..''' links = driver.find_elements("xpath", "//table//a") links[0].click() '''Select all checkboxes from dropdown''' ais_checkbox = driver.find_elements("xpath", "//input[@type='checkbox']") count_checkbox = 0 for val in ais_checkbox: count_checkbox += 1 try: val.click() except Exception as e: print(e) print(count_checkbox) '''Finish and send the declaration to Revenue''' driver.find_element("id", "finished").click() '''XML File comparison''' '''Get the XML''' driver.find_element("xpath", "//input[@value='Get XML']").click() response = requests.get(driver.current_url) print(response) soup = BeautifulSoup(response.content, 'lxml-xml') print(soup)So what dos line 54 print,is it a
url
(to the raw .xml) eg same as open link under in browser that has .xml
ending. https://www.w3schools.com/xml/plant_catalog.xml