AssortedViolatedException error

1.4k Views Asked by At

I am trying to run a Selenium script on Eclipse which gives me list of options.

I am getting following error:

Exception in thread "main" org.apache.bcel.verifier.exc.AssertionViolatedException: FOUND: INTERNAL ERROR: Oops! Exiting!! at org.apache.bcel.verifier.exc.AssertionViolatedException.main(AssertionViolatedException.java:102) Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar

Unable to understand why it is picking jasmine.jar from QTP folder.

My Class file:

package seleniumsample;

import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;

import com.google.common.base.Strings;

public class Sample {
    public static void main(Strings[] args) {
        String baseUrl=" http://www.demo.guru99.com/V4";
        String username="mngr55483";
        String password="sUqEzed";

        WebDriver driver= new FirefoxDriver();
        driver.get(baseUrl);

        WebElement userElement=driver.findElement(By.name("uid"));
        System.out.println("userelement found");
        userElement.sendKeys(username);

        WebElement pwdElement= driver.findElement(By.name("password"));
        System.out.println("pwdelement found");
        pwdElement.sendKeys(password);

        WebElement loginElement= driver.findElement(By.name("btnLogin"));
        System.out.println("loginelement found");

        loginElement.click();
        driver.close();
    }
}
0

There are 0 best solutions below