Skip to content

Commit

Permalink
all_Automation_Git_Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AmolKadam-Tekdi committed Jul 9, 2024
1 parent 2f821cf commit dc5a84e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions allAutomation/src/main/java/Tests/AllTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ private static void saveBase64ToFile(String filePath, String base64String) {

private static void injectAudioFile(String relativeFilePath) throws IOException {
// Resolve the relative path to an absolute path
logStep("Speaking text in mike");
Path absolutePath = Paths.get(relativeFilePath).toAbsolutePath();

// Read the audio file and convert it to a Base64 string
Expand All @@ -190,6 +191,8 @@ private static void injectAudioFile(String relativeFilePath) throws IOException
// Execute the JavaScript in the context of the browser
JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
jsExecutor.executeScript(script);
logStep("Speaking text in mike");

}

private static void clickElementUsingJavaScript(WebElement element) {
Expand Down

0 comments on commit dc5a84e

Please sign in to comment.