package com.practiceCode;
import org.testng.annotations.Test;
/**
* @Blog Name : Selenium Code Example
* @author Deepak Gupta
* @Created Date 26-09-2017
*
*/
public class AppendURL extends SuperTestNG {
@Test
public void testAppendURL() {
try {
driver.get("https://seleniumcodeexample.blogspot.in/");
String beforeURL = driver.getCurrentUrl();
System.out.println("Before append url : " + beforeURL);
String newURL = beforeURL + "2017/08/code-for-handling-get-current-url.html";
driver.navigate().to(newURL);
System.out.println("After append url : " + driver.getCurrentUrl());
}catch (Exception e) {
e.printStackTrace();
Assert.fail();
}
}
}
Subscribe to:
Post Comments (Atom)
Code Example - File Download By Robot Class In Firefox Browser
Exported from Notepad++ package com . practiceCode ; import java . awt . AWTException ; import java . awt . Robot ; import j...
-
package com.test.automation.uiAutomation.testBase; import java.io.File; import java.io.FileInputStream; import java.io.IOException...
-
Exported from Notepad++ package com . practiceCode ; import org . openqa . selenium . WebDriver ; import org . openqa . seleni...
-
package com.practiceCode; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import org.openqa.sel...
Please provide the extent report sample code.
ReplyDelete