Control exist web page?

Hello
I want create an app to fill the tracking number, captcha and click the tracking button

How can i get these elements and control them?
If i am not wrong i have seen an example but i don't remember where.

The link https://aptracking.poste.dz/index.php

In Python for example i use this

# Initialize the Chrome WebDriver (you need to have ChromeDriver installed and in your PATH)
driver = webdriver.Chrome()

# Load the web page
driver.get("https://aptracking.poste.dz/index.php")

# Find the input element for item codes and insert the tracking number
item_codes_input = driver.find_element(By.NAME, "itemCodes")
item_codes_input.send_keys("TRACKINGNUMBER")

# Find the input element for the captcha and insert the captcha code
captcha_input = driver.find_element(By.NAME, "code")
captcha_input.send_keys("0000")

# Find the submit button and click it to simulate submitting the form
submit_button = driver.find_element(By.NAME, "Rechercher")
submit_button.click()

search javascript injection you may get some ideas.

but how do you ocr the captcha?

1 Like

Thanks, I will check it
I will try also to get the captcha as an image if that possible
It's just a conversion from webpage to android app

I try this
The captcha get one 0 only
And the tracking number get nothing


It work now

1 Like