2017-08-29 11 views
-1

私はセレンを使用していくつかのテストを行いました。私はビジュアルスタジオ2015で私のソリューションを作成し、すべてのテストは正常に実行されますが、ビジュアルスタジオ2017でテストを実行すると、すべてのテストが右クリックする必要があるときとは別に機能します。コンテキストクリック(右クリック)ビジュアルスタジオが動作しません2017

は、私が2017

は、私は私がしようとすると右の私が要素の上に左クリックすることができますクリックする前に、要素が行にしかしnullであることを言ってランタイムエラーを取得し、これはVisual Studioでのみ起こっている理由はわからないんだけど私は要素がnullではないことを知っています。私はこの問題を考え出し

var webDriverWait = new WebDriverWait(session, TimeSpan.FromSeconds(10)); 
     Actions action = new Actions(session); 

     CommonMethods.switchWindows(session); 
     CommonMethods.keyCheck(session); 
     Thread.Sleep(2000); 
     webDriverWait.Until(ExpectedConditions.ElementTo‌​BeClickable(session.FindElementByName($"{fileName} - PowerPoint"))).Click();     
     Thread.Sleep(2000); 
     webDriverWait.Until(ExpectedConditions.ElementTo‌​BeClickable(session.FindElementByName("Create"))).Click(); 
     webDriverWait.Until(ExpectedConditions.ElementTo‌​BeClickable(session.FindElementByName("View Links"))).Click(); 
     CommonMethods.IsElementDisplayed(session, new StackTrace(true).GetFrame(0).GetFileLineNumber(), new StackTrace(true).GetFrame(0).GetMethod(), "CreateErrorIcon", "Error appeard when selecting the View Links button"); 
     webDriverWait.Until(ExpectedConditions.ElementTo‌​BeClickable(session.FindElementByName("Create"))).Click(); 
     var e =webDriverWait.Until(ExpectedConditions.ElementTo‌​BeClickable(session.FindElementByName(SlideNumber))); 
     e.Click();    
     action.ContextClick(e).Perform(); 
     webDriverWait.Until(ExpectedConditions.ElementTo‌​BeClickable(session.FindElementByName(element))).Click(); 
     keyCheck(session); 
+0

完全な例外はポストできますか? – Guy

答えて

-1

次のように

私のコードです。なんらかの理由で、WinAppDriverの最新バージョン(2017年5月)はコンテキストをクリックしません。 2017年3月版をダウンロードして問題を解決してください

+0

それは私のためにしました。私が持っていたのと同じ問題がありますか? –

関連する問題