我有两个清单。我需要比较这两个列表并将不相等的列表存储在另一个列表中
清单1:
List<WebElement> flightdetailsR = driver.findElements(By.xpath(".//li[contains(@class , 'clickable flightItem offerPanel returningLi first selected') or contains(@class , 'clickable flightItem offerPanel returningLi') or contains(@class , 'clickable flightItem offerPanel returningLi last') or contains(@class , 'clickable flightItem returningLi')]"));
清单2;
List<WebElement> flightdetailsRR = driver.findElements(By.xpath(".//li[contains(@class , 'clickable flightItem offerPanel returningLi first selected') or contains(@class , 'clickable flightItem offerPanel returningLi') or contains(@class , 'clickable flightItem offerPanel returningLi last') or contains(@class , 'clickable flightItem returningLi')]"));
我使用过RemoveAll(),但不适用于网络元素列表