0

I've an application with a GUI. The user will select an input file that contains several IDs. The application will search all these IDs in a website using Selenium one by one.

The number of IDs could be quite high so I want the user to know where the application is each time it look for a reference in the web site.

The part of the code where I look for the IDs:

    for i in range(0,self.ListWidget.count()):
        
        self.Chromium.find_element_by_xpath('//*[@id="textfield-1509-inputEl"]').clear()
        self.Chromium.find_element(By.XPATH,'//*[@id="textfield-1509-inputEl"]').send_keys(self.ListWidget.item(i).text())
        self.Chromium.find_element(By.ID, 'button-1511').click()
        time.sleep(1)
        self.TextBrowser_Log.append( "   ID" + str(i + 1) + ": " + self.ListWidget.item(i).text() + " - " + self.Chromium.find_element(By.ID,'tbtext-1425').text.split(" ")[0])

I update a QTextBrowser each time the script search for an ID, the problem is that it doesn't update until all the IDs have been searched...

I'm using Python 3.8, Selenium and PyQt5

Ralk
  • 415
  • 1
  • 5
  • 15
  • When several IDs have been searched, the status of the application is 'Not responding' even if Selenium it's still working... – Ralk Oct 25 '21 at 14:14

0 Answers0