Bonjour,
j´ai le code suivant et j´obtiens l´erreur suivante
Code : Sélectionner tout - Visualiser dans une fenêtre à part
Error :No enclosing loop out of which to break or continue
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 private void Update()
        {
   siteid = update_xap.SiteID;
 GetData();
   f_wait(8000);
            try
            {
                int count = 0;
                if (driver.FindElement(By.CssSelector("BODY")).Text.Contains(siteid))
                {
                   continue;//j´obtiens l´erreur a ce Niveau. j´aimerais que si if = true que le Programme continue a ce Niveau    IList<IWebElement> update_list = driver.FindElements(By.CssSelector("A"));
 
                }
                else if (driver.FindElement(By.CssSelector("BODY")).Text.Contains("Couldn't get the list of packages for your app. Try again later."))
                {
 
                    if (count == 5)
                    {
                        count++;
                        //break;
                    }
                    count++;
                    driver.Navigate().Refresh();
                    WebDriverWait waitcs = new WebDriverWait(driver, TimeSpan.FromSeconds(120));
                    try
                    {
                        waitcs.Until((d) => { try { return d.FindElement(By.CssSelector("BODY")).Text.Contains(siteid); } catch { return false; } });
                    }
                    catch
                    { }
                }
  }
            catch
            {
   }
            IList<IWebElement> update_list = driver.FindElements(By.CssSelector("A"));
            IWebElement[] update_array = update_list.ToArray<IWebElement>();
            bool clicked = false;
            foreach (IWebElement i in update_array)
            {
                if (i.Text.Contains("Update app"))
                {
                    i.Click();
                    clicked = true;
                    break;
                }
            }
merci d´avance