So there are invoices I need to issue.
First, I click on the checkbox to select all invoices on the current page. Then I click on the issue button, and finally approve them to be issued.
Once the current invoices issued, the ones on the next page appear automatically.
I want to repeat the same process for the next ones but I can't click on the checkbox as I did the first time. Nothing happens, it doesn't give any error. Just nothing happens.
Here is the html
@King11
time.sleep(8) --wait until invoice screen appears
driver.find_element_by_css_selector("i[class='ion-android-checkbox-outline-blank']").click() --selecting checkbox
driver.find_element_by_xpath("//button[contains(text(),'Sil')]").click() --clicking on the sent button
driver.find_element_by_xpath("//button[contains(text(),'Evet')]").click() --approve to sent
time.sleep(12) --wait till current invoices are sent and checkbox become re-eligible to select
driver.find_element_by_css_selector("i[class='ion-android-checkbox-outline-blank']").click() --select the check box second time. used javascript to eleminate GUI issues but it does not do clicking
Edit: I found the solution by writing a loop that refreshing the browser every time it issued invoices
def loopy(page_number):
while (page_number>0):
driver.refresh()
time.sleep(5)
element_1=driver.find_element_by_xpath("/html/body/app/main/app/div/div/e-arsiv/taslaklar/div[2]/div/div/div[3]/div/button")
driver.execute_script("arguments[0].click();", element_1)
element_2=driver.find_element_by_xpath("/html/body/app/main/app/div/div/e-arsiv/taslaklar/div[2]/div/div/div[3]/div/ul/button[7]")
driver.execute_script("arguments[0].click();", element_2)
driver.implicitly_wait(20)
driver.find_element_by_css_selector ("uc-quick-filter[titleshort='3A'][type='3M']").click()
driver.implicitly_wait(20)
element_4=driver.find_element_by_xpath("/html/body/app/main/app/div/div/e-arsiv/taslaklar/div[2]/div/div/div[4]/div[2]/ul/button[text()='e-Arşiv']")
driver.execute_script("arguments[0].click();", element_4)
wait = WebDriverWait(driver, 40)
temp = wait.until(EC.element_to_be_clickable((By.XPATH,"//e-arsiv/taslaklar/div[4]/div[3]/div/div/i")))
action= ActionChains(driver)
action.click(temp).perform()
element_5=driver.find_element_by_xpath("//button[contains(text(),'Sil')]")
driver.execute_script("arguments[0].click();", element_5)
element_6=driver.find_element_by_xpath("//button[contains(text(),'Evet')]")
driver.execute_script("arguments[0].click();", element_6)
driver.implicitly_wait(20)
service=driver.find_element_by_id('serviceLoading').get_attribute("style")
while (service=='display: none;'):
driver.refresh()
page_number=page_number-1
time.sleep(5)
break
else:
time.sleep(2)
service=driver.find_element_by_id('serviceLoading').get_attribute("style")