Tuesday, 26 September 2017

Code Example - Append URL

Exported from Notepad++
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(); } } }

1 comment:

  1. Please provide the extent report sample code.

    ReplyDelete

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...