小编San*_*hit的帖子

WPF Toolkit Charting和IndependentValueBinding,IndependentValuePath

我遇到了WPF工具包中的图表引擎问题.

我没有将数据移动到适当的对象模型,因此ItemSource支持一个DataView.

第一次尝试

<chartingToolkit:ScatterSeries x:Name="TargetSeries" 
  DataPointStyle="{StaticResource TargetStyle}"  
  ItemsSource="{Binding Path=TargetSeriesData}"
  IndependentValueBinding="{Binding Path=TargetSeries_X}" 
  DependentValueBinding="{Binding Path=TargetSeries_X}" />
Run Code Online (Sandbox Code Playgroud)

这崩溃是因为我认为绑定被认为是情节的值或某种不匹配.

第二次尝试

<chartingToolkit:ScatterSeries x:Name="TargetSeries" 
  DataPointStyle="{StaticResource TargetStyle}" 
  ItemsSource="{Binding Path=TargetSeriesData}"
  IndependentValuePath="{Binding Path=TargetSeries_X}"
  DependentValuePath="{Binding Path=TargetSeries_X}" />
Run Code Online (Sandbox Code Playgroud)

此崩溃发生在初始化步骤期间,因为Path属性不支持依赖项属性,因此无法绑定.

第三次尝试

<chartingToolkit:ScatterSeries x:Name="TargetSeries" 
  DataPointStyle="{StaticResource TargetStyle}"  
  ItemsSource="{Binding Path=TargetSeriesData}"
  IndependentValuePath="targetFooXColumnName" 
  DependentValuePath="targetFooYColumnName" />
Run Code Online (Sandbox Code Playgroud)

现在这个有效!但我想使用绑定,所以我可以从使用targetFooXColumnName到切换targetFooBarXColumnName.因此,此解决方案将导致大量hacky外观代码手动切换路径.

有没有办法来解决这个问题?我可以使用某种转换器来获取Binding属性以正确地从DataView中的列中提取数据吗?

谢谢,乔尔

wpf charts binding wpftoolkit

18
推荐指数
1
解决办法
3667
查看次数

如何在Jenkins上配置Test Result Analyzer插件

我在Jenkins中安装了Test Result Analyzer插件,但收到消息: No build data retrieved. You may need to select a Module.

安装插件后 - 我的下一步工作是什么?

是否有必要启用"发布TestNG结果"插件?

谢谢

testng jenkins-plugins

9
推荐指数
1
解决办法
2万
查看次数

具有相同类型和ID的多个按钮

我是Selenium的新手.以下是我的代码.

<input type="submit" id="button" value="Edit"/>
Run Code Online (Sandbox Code Playgroud)

我有3个具有相同类型,ID和值的按钮.如何点击每个按钮?任何人都可以帮我解决XPath问题吗?

selenium xpath selenium-rc selenium-webdriver

8
推荐指数
2
解决办法
5万
查看次数

Selenium:如何让WebDriver忽略"元素不可见"错误?

我正在使用Selenium WebDriver(v2.5.0).当我使用driver.click(...)"命令时,我收到此错误

Element is not currently visible and so may not be interacted with Build info: version: '2.5.0', revision: '13516', time: '2011-08-23 18:30:44' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-10-generic', java.version: '1.6.0_26' Driver info: driver.version: RemoteWebDriver
Run Code Online (Sandbox Code Playgroud)

在鼠标悬停在元素上的浏览器中,单击的元素变为可见.有没有办法检查某些东西是否可见?

selenium selenium-webdriver

7
推荐指数
1
解决办法
1万
查看次数

Selenium - 使用相同的类名定位多个元素

你好,我试图找到具有相同className的多个元素.className和元素的主体结构是相同的,但文本,链接和图片是不同的.

  <div class="dc-content-right clearfix"> (parent)
  <div class="dc-item clearfix">        (child nodes) 
  <div class="dc-item clearfix">
  <div class="dc-item clearfix">
Run Code Online (Sandbox Code Playgroud)

这些子元素中的每一个都看起来像这样:

<div class="dc-item clearfix">
  <div class="dc-icon">
  <div class="dc-info">
    <h2>
      <a href="http://www.avg.com/ww-en/free-antivirus-download">AVG AntiVirusFree 2015</a>
    </h2>
Run Code Online (Sandbox Code Playgroud)

每个子元素在H2标记中都有不同的文本.因此,一旦它是AVG AntiVirus Free 2015,那么它就是Internet Security ....等等.所以我想要做的是将所有元素保存到列表中,然后使用它们.首先,我将这些元素保存到WebElements列表中:

List <"WebElement"> list = driver.findElements(By.xpath("//div[@class='dc-item clearfix']"));
Run Code Online (Sandbox Code Playgroud)

之后我想迭代列表并为屏幕上的每个元素写入h2文本:

for(WebElement i:superDiv)
            {
                System.out.println(i.findElement(By.xpath("//h2/a")).getText());
            }
Run Code Online (Sandbox Code Playgroud)

所以结果应该是从中提取的3个不同标题的列表divs.的问题:结果是3个标题的这是列表一样!

AVG AntiVirus Free 2015
AVG AntiVirus Free 2015
AVG AntiVirus Free 2015
Run Code Online (Sandbox Code Playgroud)

看起来我找到了相同的元素3次.有谁知道可能是什么问题?谢谢

selenium

6
推荐指数
1
解决办法
2万
查看次数

Selenium Java(maven项目):TestNG结果与ReportNG不同

我试过跑步testng.xml,结果如下:

===============================================

默认测试

测试运行:14,失败:6,跳过:0

默认套件

总测试运行:14,失败:6,跳过:0

===============================================

现在,我禁用了deafult TestNG监听器并添加了ReportNG listner testng.xml.的testng.xml.看起来像这样:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
    <listeners>
        <listener class-name="org.uncommons.reportng.HTMLReporter" />
        <listener class-name="org.uncommons.reportng.JUnitXMLReporter" />
    </listeners>
    <test name="Test">
        <classes>
            <class name=".URL_Daily" />
        </classes>
    </test> <!-- Test -->
</suite> <!-- Suite -->
Run Code Online (Sandbox Code Playgroud)

下面的步骤,我加入velocity,guicereportng在Maven的依赖关系pom.xml.

执行测试套件后testng.xml,创建了以下文件夹(标记为红色框).

在此输入图像描述

打开后index.html,结果如下: 在此输入图像描述

正如预期的那样,ReportNG应该创建一个输出文件夹,在我的场景中没有注意到.其次,结果不同.

此外,该报告index.html并未显示实际应该如何.有人可以说出错了吗?

一些细节供您参考:

操作系统:Windows 7

Guice.jar版本: guice-4.1.0

ReportNG版本: reportng-1.1.4

速度版: velocity-dep-1.4

TestNG版本: testng-6.11

Selenium版本: selenium-java-3.5.3 …

java testng selenium maven reportng

6
推荐指数
1
解决办法
584
查看次数

我正在尝试使用Selenium Webdriver按类名查找输入元素

如何找到元素input class="Test_type"?我顺利过关id=Test1但没找到元素input class="Test_type"

我试过了:

WebElement mainform = driver.findElement(By.className("mainform"));

List<WebElement> postadchildone2 = mainform.findElements(By.className("formrow"))

for(WebElement formrow: postadchildone2)
{
    WebElement formfield = formrow.findElement(By.className("formfield"));
    WebElement inputclass = formfield.findElement(By.className("Test_type"))

}
Run Code Online (Sandbox Code Playgroud)

还尝试使用CSS选择器和XPath,但是它仍然没有找到,因为它没有找到相同的类名input class.

for循环下我试着做

formrow.getText()
Run Code Online (Sandbox Code Playgroud)

它显示所有文本结果,但它没有取类名?我被困了请求帮助

HTML:

<div class="mainform">
  <div class="formrow">
    <div class="formrow">
      <div class="formrow">
        <div class="formfield">
          <div id="Test1" class="city_select">
            <div class="blank1"/>
            <div class="formrow " style="margin-left:10px;">
              <div class="formrow">
                <div class="formlabel">
                   <strong>You Are</strong>
                </div>
                <div class="formfield">
                  <label>
                    <input class="Test_type required" type="radio"/>
                    YouareTest
                  </label>
                </div>
              </div>
            </div>
          </div>
        </div> …
Run Code Online (Sandbox Code Playgroud)

selenium

0
推荐指数
1
解决办法
3万
查看次数