text: 
  const batches = require('../pageobjects/batches.page.js');
  const matrix = require('../utility/2dMatrixPage')
  const data = require('../utility/expectationFile')
  const utilityFunction = require('../utility/reusableFunctions')
  const wait = require('../utility/timeout')
  const testData = require('../testdata/config.json')
  const allureReporter = require('@wdio/allure-reporter').default
  
  
  
  describe('039_Create a batch with MonthYear as expiry date and enable day selection, disable incorrect and enable expired date flag', () => {
  
  
      if (!process.env.npm_config_browserOnly) {
  
  
          after(async () => {
              console.log("Starting Mobile Execution");
              await utilityFunction.runAppium("enableDaySelectionAndExpiredDateAndDisableIncorrectTestRun")
          })
          console.log("Running test suite in incremental mode and browser tests only")
  
      } else {
  
          console.log("different flag")
      }
  
      it('Browser - should create a batch and enable day selection, disable incorrect and enable expired date ', async () => {
          allureReporter.addDescription("create new batch and enable day selection, disable incorrect and enable expired date")
          allureReporter.addStep('create a batch and enable day selection, disable incorrect and enable expired date')
          allureReporter.addTestId('ExpiryDateChecks_3_7')
          //click batch
          await batches.clickBatchFromSideNav();
          await wait.setTimeoutwait(3);
          //add batch
          await batches.addBatch();
          await wait.setTimeoutwait(3);
          utilityFunction.setBatchId(await batches.batchIdValue())
          await wait.setTimeoutwait(3);
          //enter site name
          await batches.siteName(testData.newBatchDetails.siteName);
          await wait.setTimeoutwait(3);
          //select date
          // info.setCurrentRandomDate()
          const expiredDate = utilityFunction.randomDateExpired()
          await wait.setTimeoutwait(3);
          await browser.execute((date) => {
              (function () {
                  let event = new Event('change');
                  let datePicker = document.querySelector("input[placeholder='dd/mm/yyyy']")
                  datePicker.value = date;
                  datePicker.dispatchEvent(event);
              })();
          }, expiredDate);
  
          console.log("different date is" + utilityFunction.randomDate())
          await wait.setTimeoutwait(3);
          //click on Incorrect Expiration Date Verification
          await batches.enableIncorrectExpirationDateVerificationClick()
          await wait.setTimeoutwait(3);
          //select product from dropdown
          const selectBox = await browser.$('//psk-select[@class=\'default-select hydrated\']//select[@class=\'form-control\']');
          await selectBox.selectByAttribute('value', utilityFunction.getProductId());
          await wait.setTimeoutwait(3);
          await batches.videoSource(testData.newBatchDetails.videoSource)
          await wait.setTimeoutwait(2);
          //update serial number
          await batches.selectUpdateValidSerialFromDropdown(testData.newBatchDetails.updateValid)
          await wait.setTimeoutwait(5);
  
          //set serial number value
          utilityFunction.setSerialNumber(await batches.serialNum())
          //enter serial number
          await batches.enterSerialNumber(utilityFunction.getSerialNumber())
          await wait.setTimeoutwait(5);
          //manage serial number accept
          await batches.acceptSerialNumber()
          await wait.setTimeoutwait(3);
          //generate expectation file
          data.generateExpectationFile(utilityFunction.getProductId(), await batches.batchIdValue(), expiredDate, utilityFunction.getSerialNumber(), utilityFunction.getBrandName(), "", "", "", "")
          await wait.setTimeoutwait(12);
          //generate 2d matrix image
          matrix.generate2dMatrixImage(utilityFunction.getProductId(), await batches.batchIdValue(), expiredDate, utilityFunction.getSerialNumber())
          await wait.setTimeoutwait(9);
          //create batch
          await batches.createBatch()
          await wait.setTimeoutwait(40);
          allureReporter.addAttachment('img', Buffer.from(await browser.takeScreenshot(), 'base64'), 'image/jpeg');
  
  
  
      })
  })