qmetry / qaf

Quality Automation Framework for web, mobileweb, mobile native and rest web-service using Selenium, webdrier, TestNG and Java Jersey
https://qmetry.github.io/qaf
MIT License
254 stars 138 forks source link

Reading integer numbers from xlsx file adds decimal point. #416

Open ykhudos opened 2 years ago

ykhudos commented 2 years ago

QAF Version

3.1.0b

Steps To Reproduce

1. Create a test scenario that reads data from Excel file
2. If the data is a number, in my case 5, it is converted into 5.0 in the step execution. 

The described behaviour exists only for .xlsx files. If I save the excel file as .xls, no decimal point is added and 5 in the spreadsheet stays 5 in the test step.

Expected behavior

Data from Excel files should be read exactly as it appears in the Excel file. No conversion/modification.

Actual behavior

If data in Excel spreadsheet is a number, then a .0 is added to the number after QAF reads it. For example 5 in Excel becomes 5.0 in test step.

My project is Maven Junit4/Cucumber5/QAF3.1.0b

cjayswal commented 2 years ago

If you want it as string set cell/column format string (Text or @) in excel,

Sureshsekar123 commented 2 years ago

Put an ' before the number