Created
December 1, 2024 15:14
-
-
Save borodicht/d17645d286ccf77f39ab610e6cb43bb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomeFile { | |
private double getResult(String sValue) { | |
Double value1 = Double.valueOf(String.value0f(driver.findElement(By.css("#value1")).getText())); | |
Double value2 = Double.valueOf(String.value0f(driver.findElement(By.css(".value2")).getText())); | |
String operation = driver.findElement(By.id("opeartion")).getText(); | |
Double Dresult; | |
if (operation.equals("Сумма")) { | |
Dresult = value1 + value2; | |
} else if (operation.equals("Разница")) { | |
Dresult = value1 - value2; | |
} else if (operation.equals("Деление")) { | |
Dresult = value1 / value2; | |
} | |
return Dresult; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment