Unsupported command assignID with JUnit4 from Selenium IDE -


i'm new junit , selenium ide, i'm experiencing error - unsupported command 'assignid' in junit4. there equivalent in junit 4 selenium ide? in selenium looks this:

command assignid
target id=_globalsearchtextbox
value search

command type
target search
value undergraduate courses

  public void testfindugcourse4() throws exception {       driver.get(baseurl + "/index.aspx");       assertequals("university of birmingham - university of year graduate employment", driver.gettitle());       boolean x = iselementpresent(by.xpath("//button[@type='button']"));     driver.findelement(by.cssselector("button.search-toggle.js-search-toggle")).click();       // error: caught exception [error: unsupported command [assignid | id=_globalsearchtextbox | search]]       // error: caught exception [error: locator strategy either id or name must specified explicitly.]       driver.findelement(by.id("_globalsearchbutton")).click();       assertequals("search", driver.gettitle());       driver.findelement(by.linktext("course results")).click();       driver.findelement(by.cssselector("a.faux-radio.icon--radio")).click();       try {         assertequals("undergraduate", driver.findelement(by.xpath("(//a[contains(text(),'undergraduate')])[2]")).gettext());       }      catch   (error e) {      verificationerrors.append(e.tostring());       }       try {     asserttrue(driver.findelement(by.id("courseresults")).gettext().matches("^[\\s\\s]*level[\\s\\s]*undergraduate[\\s\\s]*$"));        }      catch     (error e)   {         verificationerrors.append(e.tostring());       }       assertequals("search", driver.gettitle());     } 


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -