2014-07-01 56 views
0

導航窗格登錄到用戶後未加載項目。登錄登錄後Naviagtion面板未加載

通過以下步驟:

  1. 首頁DISPLY在頁面頂部的「關於」三個按鈕,「登錄」,「註冊」

  2. 腳本點擊登錄並插入登錄ID和密碼,點擊「登錄」按鈕。

  3. 現在應該爲登錄用戶加載Naviagtion項目,現在應該出現「註銷」按鈕。它需要多次點擊登錄按鈕才能完全加載頁面。

任何人都可以幫我嗎?我已經嘗試deleteallcookies()。手動清除緩存,但沒有爲我工作。請看下面的代碼:

@Test(priority=1) 
     public void Login() throws Exception{ 
     try{ 
     System.out.println("test 1"); 
     if(driver.getTitle().equalsIgnoreCase("KAPx")) 
     {   
//Find and click on Login button 
         CommonFunctions.waitForElementPresentCss(driver,"a.nav-login",5); 
      CommonFunctions.clickElementByCssSelector(From_Addr,To_Addr,EmailPassword,driver,"a.nav-login"); 
//find and insert user name 
         CommonFunctions.waitForElementPresentXpath(driver,"html/body/div[1]/div/form/fieldset/div[1]/div/input",5); 
       CommonFunctions.typeByXpath(driver,"html/body/div[1]/div/form/fieldset/div[1]/div/input",KAPxuserName); 
//Find and insert password 
         CommonFunctions.waitForElementPresentXpath(driver,"html/body/div[1]/div/form/fieldset/div[2]/div/input",5); 
        CommonFunctions.typeByXpath(driver,"html/body/div[1]/div/form/fieldset/div[2]/div/input", password); 
//Click on Sign In 
         CommonFunctions.waitForElementPresentXpath(driver,"html/body/div[1]/div/form/fieldset/div[4]/div/button",5); 
        CommonFunctions.clickElementByXPath(From_Addr,To_Addr,EmailPassword,driver,"html/body/div[1]/div/form/fieldset/div[4]/div/button"); 
//Wait for Logout to appear      

          CommonFunctions.waitForElementPresentXpath(driver,"LOGOUT",5); 
     } 
+0

那麼這是一個應用程序問題呢?! – Arran

+0

@Arran手動它工作正常,所以看起來不像應用程序問題... – user3122923

回答

0

嘗試從您的瀏覽器中刪除緩存並檢查結果。如果問題仍然存在,請發送一些截圖或代碼片段。