0

I have created an excel file for managing data for my test. When the script is run, it will create a patient, and write the patient name and last name into an excel file.

Then I have used that patient for my order creation. At this point, the script is working fine. But after order creation, I want to search patients, and for that, when I read data from an excel file, it should send the data used when the script was run last time.

Please check this video for more clarification here

It will create an order using a new patient, but when I search for a patient, it should catch old data from an excel file.

When I run a single test, it will work. But when I run all tests together, it will return old data. Please check video here

FilePath = "C:/Users/Administrator/PycharmProject/LegrandePython/TestData/Data.xlsx"
datafile = load_workbook(FilePath, data_only=True)
testData = datafile['Test Data']

This works fine when I create an order for the created patient.

PatientSearch.send_keys(testData.cell(2, 1).value)

But when I try to search for patients, it should send the old data from the excel sheet.

self.driver = setup
self.driver.find_element_by_css_selector(DispenserLocators.patientSearch).send_keys(testData.cell(2, 1).value)
3
  • Please include relevant code in your question. Commented Jan 10, 2022 at 12:07
  • It's not possible to see what's wrong from that code. Commented Jan 10, 2022 at 14:03
  • 1
    @CharlieClark I have updated my question please check if you got any idea. Commented Jan 11, 2022 at 4:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.