Javascript 使用selenium和ngWebDriver访问动态ng repeat
我正在自动化一个web界面。有些帧基于角度JS。 我正在尝试访问动态列中的ng repeat 以下是我的DOM的一个片段:Javascript 使用selenium和ngWebDriver访问动态ng repeat,javascript,java,angularjs,selenium-webdriver,Javascript,Java,Angularjs,Selenium Webdriver,我正在自动化一个web界面。有些帧基于角度JS。 我正在尝试访问动态列中的ng repeat 以下是我的DOM的一个片段: <div class="containCol__col column-animation col0" ng-repeat="column in sbCtrl.SlideboardStore.columns track by` sbCtrl.getUniqueColumnId(column)" column-id="emptydata" ng-class="
<div class="containCol__col column-animation col0" ng-repeat="column
in sbCtrl.SlideboardStore.columns track by`
sbCtrl.getUniqueColumnId(column)" column-id="emptydata" ng-class="
{'enabled': column.showNewCardInput, 'containCol__col__collapsed':
column.isCollapsed}" style="opacity: 1;">
以下是我在Selenium中尝试做的事情:
WebDriverFactory.getDriver().findElement(ByAngular.withRootSelector("#application-container").exactRepeater());
现在我的问题是如何找到中继器的选择器,因为它是动态的,我想先选择列,但因为它不是一个帧,我不知道该怎么处理
提前感谢大家好,刚刚找到了答案,我已经从选择器中删除了动态部分,并通过Xpath选择了列,它就像一个符咒一样工作
WebElement repeater = WebDriverFactory.getDriver().findElement(ByAngular.withRootSelector("#application-container").exactRepeater("column in sbCtrl.SlideboardStore.columns"));
大家好,我刚刚找到了答案,我已经从选择器中删除了动态部分,并通过Xpath选择了列,它就像一个符咒
WebElement repeater = WebDriverFactory.getDriver().findElement(ByAngular.withRootSelector("#application-container").exactRepeater("column in sbCtrl.SlideboardStore.columns"));