Fixed SQL query that had a type on the query statement. Added beginning processes of automation to create new refuel and check if refuel intial process is complete or not to determine what information to fill in this is in case a user has captured an initial refuel for a truck.
Added automated processes to disable rules before running main loop, create initial refuel if F link is green, and/or else complete the refuel and repeat for all entries provided in csv. If error occurs add to error array, continue onto next line item. Check refuel form that is been updated is correct form for correct truck. Enable rules when finished.
Changed import data structure and format of csv file to import to instead process line by line per refuel transaction. Testing on rule update to switch off refuel rules.
add new private function to get selected option in select element. Amended coded where find element was failing where element was select/option to option. Ran through code step by step and for each scenario. Code finalised and working.