Created
October 13, 2025 12:17
-
-
Save borodicht/8aa402966ae490807bee6745b60a996d 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
package tests; | |
public class SomeFile { | |
private double getResult(String sValue) { | |
Double value1 = Double.valueOf(String.value0f(driver.findElements(By.css("#value1")).getText())); | |
Double value2 = Double.valueOf(String.value0f(driver.findElements(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