selenium working well
This commit is contained in:
@@ -599,7 +599,7 @@ export function ClaimForm({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
placeholder="eg. MOD"
|
placeholder="eg. 'B', 'D', 'F', 'I', 'L', 'M', 'O'"
|
||||||
value={line.toothSurface}
|
value={line.toothSurface}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
updateServiceLine(i, "toothSurface", e.target.value)
|
updateServiceLine(i, "toothSurface", e.target.value)
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ app.add_middleware(
|
|||||||
@app.post("/run")
|
@app.post("/run")
|
||||||
async def run_bot(request: Request):
|
async def run_bot(request: Request):
|
||||||
data = await request.json()
|
data = await request.json()
|
||||||
print(data)
|
|
||||||
input("waiting")
|
|
||||||
try:
|
try:
|
||||||
bot = AutomationMassDHP(data)
|
bot = AutomationMassDHP(data)
|
||||||
result = bot.main_workflow("https://providers.massdhp.com/providers_login.asp")
|
result = bot.main_workflow("https://providers.massdhp.com/providers_login.asp")
|
||||||
|
|||||||
@@ -201,13 +201,11 @@ class AutomationMassDHP:
|
|||||||
|
|
||||||
# 2 - Upload PDFs:
|
# 2 - Upload PDFs:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
pdfs_abs = [proc for proc in self.pdfs]
|
pdfs_abs = [proc for proc in self.pdfs]
|
||||||
|
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
for pdf_obj in pdfs_abs:
|
for pdf_obj in pdfs_abs:
|
||||||
base64_data = pdf_obj["buffer"]
|
base64_data = pdf_obj["bufferBase64"]
|
||||||
file_name = pdf_obj.get("originalname", "tempfile.pdf")
|
file_name = pdf_obj.get("originalname", "tempfile.pdf")
|
||||||
|
|
||||||
# Full path with original filename inside temp dir
|
# Full path with original filename inside temp dir
|
||||||
@@ -232,7 +230,7 @@ class AutomationMassDHP:
|
|||||||
# 3 - Indicate Missing Teeth Part
|
# 3 - Indicate Missing Teeth Part
|
||||||
try:
|
try:
|
||||||
# Handle the missing teeth section based on the status
|
# Handle the missing teeth section based on the status
|
||||||
missing_status = self.missingTeethStatus
|
missing_status = self.missingTeethStatus.strip() if self.missingTeethStatus else "No_missing"
|
||||||
|
|
||||||
if missing_status == "No_missing":
|
if missing_status == "No_missing":
|
||||||
missing_teeth_no = wait.until(EC.presence_of_element_located((By.XPATH, "//input[@type='checkbox' and @name='PAU_Step3_Checkbox1']")))
|
missing_teeth_no = wait.until(EC.presence_of_element_located((By.XPATH, "//input[@type='checkbox' and @name='PAU_Step3_Checkbox1']")))
|
||||||
@@ -265,6 +263,7 @@ class AutomationMassDHP:
|
|||||||
|
|
||||||
# 4 - Update Remarks
|
# 4 - Update Remarks
|
||||||
try:
|
try:
|
||||||
|
if self.remarks.strip():
|
||||||
textarea = wait.until(EC.presence_of_element_located((By.XPATH, "//textarea[@name='Remarks']")))
|
textarea = wait.until(EC.presence_of_element_located((By.XPATH, "//textarea[@name='Remarks']")))
|
||||||
textarea.clear()
|
textarea.clear()
|
||||||
textarea.send_keys(self.remarks)
|
textarea.send_keys(self.remarks)
|
||||||
|
|||||||
Reference in New Issue
Block a user