I use Selenium RC and Chrome, when I run the test, it gives me this error
error(1340708572726): Unexpected Exception: Object [object HTMLIFrameElement] has no method 'getCurrentWindow'
However, I do not always get this error. the test passes several times, and once the test itself fails. I changed the browser to IE and did not receive this error. Here is the relevant piece of code
void editResumeInfo(String objective, String company, String jobDesc, String city, String phoneCountry, String phoneArea, String phoneNumb, String coleg, String certificateName, String certificateLocation, String seminarName, String seminarLocation, String notes){ selenium.type("id=objective", objective) selenium.click("xpath=//html/body/div/div/div[3]/div/div[2]/div[3]/form/div/div/div[2]/div[3]/a") selenium.select("id=experienceIndustry0", "label=Health Care") selenium.select("name=experienceProfession", "label=Direct Support Professional") selenium.select("id=experienceStartDate0_month", "label=May") selenium.select("id=experienceStartDate0_year", "label=2006") selenium.select("id=experienceEndDate0_month", "label=August") selenium.select("id=experienceEndDate0_year", "label=2011") selenium.type("id=experienceCompany0", company) selenium.type("id=experienceJobDesc0", jobDesc) selenium.type("id=experienceAddressCity0", city) selenium.select("id=experienceAddressCountry0", "label=Guyana") selenium.type("id=experiencePhoneCountryCode0", phoneCountry) selenium.type("id=experienceAreaCode0", phoneArea) selenium.type("id=experiencePhoneNumber0", phoneNumb) selenium.click("xpath=//html/body/div[2]/div/div[3]/div/div[2]/div[3]/form/div/div/div[3]/div[3]/a") selenium.select("id=educationLevel0", "label=Post Graduate") selenium.select("id=educationDegree0", "label=Biomedical Science") selenium.type("id=educationCollege0", coleg) selenium.select("id=educationGradDate0_year", "label=2011") selenium.type("id=certificateName0", certificateName) selenium.type("id=certificateLocation0", certificateLocation) selenium.select("id=certificateDate0_month", "label=May") selenium.select("id=certificateDate0_year", "label=2004") selenium.click("xpath=//html/body/div[2]/div/div[3]/div/div[2]/div[3]/form/div/div/div[4]/div[3]/a") selenium.type("id=seminarName0", seminarName) selenium.type("id=seminarLocation0", seminarLocation) selenium.select("name=seminarDate_month", "label=March") selenium.select("name=seminarDate_year", "label=2011") selenium.type("id=skillNotes", notes) selenium.clickAndWait("id=submit") }
I call this method from
@Test void objectiveFiveThousandInputShowSuccess(){ values=TestDataController.characterGen(5000) editResumeInfo(values, "abcd", "this is job", "bangalore", "91", "0381", "232269876", "IIT", "test certificate", "bangalore", "test seminar", "delhi", "note" ) CheckSuccess() } @Test void objectiveFieldOnNullInputShowSuccess(){ editResumeInfo("", "abcd", "this is job", "bangalore", "91", "0381", "232698376", "IIT", "test certificate", "bangalore", "test seminar", "delhi", "note" ) CheckSuccess() } @Test void companyFieldOnFiveHundredShowSuccess(){ values=TestDataController.characterGen(500) editResumeInfo("objective", values, "this is job", "bangalore", "91", "0381", "23269876", "IIT", "test certificate", "bangalore", "test seminar", "delhi", "note" ) CheckSuccess() }