Skip to content
Advertisement

how to compare two numbers with selenium and java? (One number from CSV file and another in website)

I wrote a Program to compare prices in website with a csv file with selenium and java, at the end of program i wrote assert to confirm two numbers but it has a problem: expected price is 57,15
Actual price is 57.15

Actual Price should be 57,15 and i dont know how should i write that, Can you please help me?

JavaScript

Advertisement

Answer

Please try below codes before assertion line to change “.” to “,” in your string data:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement