You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@test(priority = 1)
public void openurl() {
DR.get("https://mail.rediff.com/cgi-bin/login.cgi");
String Actual= DR.getTitle(); //to know the title of webpage
Assert.assertEquals(Actual,"Rediffmail");
I am trying to run same test cases in different browser. Can anybody help what is wrong in this
Error:
Parameter 'browser' is required by BeforeTest on method SetPropertyandopenBrowser but has not been marked @optional or defined
package mytestngpackage;
import org.testng.annotations.Test;
import org.testng.Assert;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;
public class MultipleBrowser {
@BeforeTest
@parameters("browser")
public void SetPropertyandopenBrowser(String browser) {
}
@test(priority = 1)
public void openurl() {
DR.get("https://mail.rediff.com/cgi-bin/login.cgi");
String Actual= DR.getTitle(); //to know the title of webpage
Assert.assertEquals(Actual,"Rediffmail");
}
@test(priority = 2,dependsOnMethods = "openurl")
public void enterusername() {
DR.findElement(By.name("login")).sendKeys("[email protected]");
}
@test(priority=3,dependsOnMethods = "enterusername")
public void enetrpassword() {
DR.findElement(By.id("password")).sendKeys("12345");
}
}
The text was updated successfully, but these errors were encountered: