小编khr*_*ris的帖子

硒,我该如何选择新窗口

我在Eclipse中用TestNG运行我的selenium rc测试.我有一个试图打开新浏览器页面的链接.如何选择此新页面进行操作?我用这个代码:

selenium.selectWindow("name=NewPage");

但它说找不到页面.我还尝试使用以下代码定义页面ID或标题:

String[] wins = selenium.getAllWindowIds();
    for (String s : wins)
         System.out.println("win: " + s); 
Run Code Online (Sandbox Code Playgroud)

它没有定义我新打开的窗口:

win: MainPage
win: 
Run Code Online (Sandbox Code Playgroud)

如果使用selenium.getAllWindowNames()我得到win: selenium_main_app_window win: selenium_blank65815.

我写这段代码selenium.selectWindow("name=blank99157"); 但得到错误 -ERROR: Window does not exist. If this looks like a Selenium bug, make sure to read http://seleniumhq.org/docs/02_selenium_ide.html#alerts-popups-and-multiple-windows for potential workarounds.

java selenium popupwindow selenium-rc

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

(13)权限被拒绝:检索pid文件运行/ httpd.pid时出错

我已经安装了httpd-2.2.29使用命令:

./configure --prefix=/home/user/httpd
make
make install
Run Code Online (Sandbox Code Playgroud)

我配置httpd.conf并试图开始apache: apachectl start.但得到以下错误:

(13)权限被拒绝:检索pid文件时出错运行/ httpd.pid如果它已损坏,请在继续之前将其删除.

我试图找到文件httpd.pid,但哪里没有这样的文件.

有人可以帮我解决这个问题吗?

apache redhat

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

如何解决“此证书无法由受信任的证书颁发机构验证”

IE9的安全证书有问题。

然后我转到我得到的特定地址

There is a problem with this website's security certificate.
Run Code Online (Sandbox Code Playgroud)

如何避免出现此窗口?

我尝试在“继续浏览此网站”上输入(不推荐)。-错误错误-查看证书。我看到此证书还可以。在“证书路径”选项卡上的“证书状态”中。但是在“常规”选项卡上,我看到以下文本:This certificate cannot be verified up to a trusted certification authority 1)安装证书2)从mmc导出到我的文件夹3)转到工具-Internet选项-内容-证书-导入,然后将此证书导入到受信任的根证书颁发机构,重新启动IE,但是该证书没有出现在此列表中。我尝试将其导入到Trusted Publishers-证书显示在该列表中。4)我检查mmc,此证书位于“受信任的根证书颁发机构”部分。

经过所有这些尝试There is a problem with this website's security certificate.,输入网站网址后,我仍然出现。有人可以帮我解决这个问题吗?

security internet-explorer certificate

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

如何将输出重定向到subprocess.Popen中的文件

我尝试这样的代码将标准输出重定向到文件:

subprocess.Popen('my command', cwd='my path', shell=True, stdout=stdout.txt, stderr=stdout.txt)
Run Code Online (Sandbox Code Playgroud)

但得到错误: NameError: name 'stdout' is not defined

我使用python版本2.5.2

python stdout

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

"javax.xml.ws.WebServiceException:不是有效的服务.有效的服务是:"如何解决

我已经实现了Web服务MyWebServiceImpl,如:

@WebServiceClient(//my parameters//)
@HandlerChain(file = "handlers.xml")
public class MyWebServiceImpl {...}
Run Code Online (Sandbox Code Playgroud)

我也有像MyWebService这样的接口

@WebService(//my parameters//)
@XmlSeeAlso({
com.my.ObjectFactory.class,
com.my.second.ObjectFactory.class,
com.my.third.ObjectFactory.class
})
public interface MyWebService {...}
Run Code Online (Sandbox Code Playgroud)

我想使用Soap处理程序获得响应,因此我创建了handlers.xml,LoggingHandler.然后我尝试执行我的测试类我得到错误:

javax.xml.ws.WebServiceException: {http://service.ws.my.com/}MyWebServiceImpl is not a valid service. Valid services are: {http://service.ws.my.com/}myWebService
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:223)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:168)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:96)
at javax.xml.ws.Service.<init>(Service.java:77)
at com.my.ws.service.MyWebServiceImpl.<init>(MyWebServiceImpl.java:46)
at test.MainTest.<init>(MainTest.java:354)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at …
Run Code Online (Sandbox Code Playgroud)

response jax-ws handler

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

无法使用psexec在远程计算机上启动记事本

我需要在远程计算机上执行一些脚本,我尝试启动记事本.我用psexec这个命令

psexec -e -i 1 \\localhost -u domain\user -p password cmd /c notepad.exe
Run Code Online (Sandbox Code Playgroud)

在我的本地计算机上成功打开记事本,但不在远程上执行.我看不到任何错误,输出与我在本地机器上执行后看到的相同:

PsExec v2.0 - Execute processes remotely
Copyright (C) 2001-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
Run Code Online (Sandbox Code Playgroud)

可能是因为我无法在远程计算机上成功执行记事本?

windows psexec

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

使用中的窗口小部件集似乎不是针对使用中的Vaadin版本构建的

我想将Vaadin图表添加到我的项目中,添加maven依赖项,安装许可证和vaadin clean,更新窗口小部件集并进行编译。但是,当我运行应用程序并打开localhost:8080时,控制台出现错误:

The widgetset in use does not seem to be built for the Vaadin
version in use. This might cause strange problems - a
recompile/deploy is strongly recommended.
Vaadin version: 8.0.0
Widgetset version: 8.0-SNAPSHOT
Run Code Online (Sandbox Code Playgroud)

以及用户界面上的以下消息:https : //www.screencast.com/t/deDF6kVsvDdU

这是我pom.xml中的vaadin依赖项:

<dependencies>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-spring-boot-starter</artifactId>
        <version>2.0.0</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-charts</artifactId>
        <version>4.0.0</version>
    </dependency>
</dependencies>


<repositories>
    <repository>
        <id>vaadin-addons</id>
        <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
</repositories>

<build>
    <plugins>
        <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>8.0.4</version>
            <configuration>
                <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
                <draftCompile>false</draftCompile>
                <compileReport>false</compileReport>
                <style>OBF</style>
                <strict>true</strict>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>update-theme</goal>
                        <goal>update-widgetset</goal>
                        <goal>compile</goal>
                        <goal>compile-theme</goal> …
Run Code Online (Sandbox Code Playgroud)

vaadin maven

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

检查元素是否存在

我在Eclipse中使用selenium web-driver.我需要检查表是否显示在页面上.我用这样的代码:

try {
    Assert.assertTrue(driver.findElement(By.xpath(".//*[@id='flexibleTable']")).isDisplayed());
} catch (AssertionError e) {
    System.err.println("overview not found: " + e.getMessage());
}
Run Code Online (Sandbox Code Playgroud)

也阻止if

if (driver.findElement(By.xpath(".//*[@id='flexibleTable']")).isDisplayed()) {
    ...
} else {
    ...
}
Run Code Online (Sandbox Code Playgroud)

但如果找不到这样的元素,测试就会中断.如何组织检查以便我的测试继续,即使元素不在页面上,其他块将执行?

编辑 失败跟踪

org.openqa.selenium.NoSuchElementException: Unable to find element with xpath == .//*[@id='flexibleTable'] (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 360 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.23.1', revision: '17143', time: '2012-06-08 18:59:04'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', …
Run Code Online (Sandbox Code Playgroud)

java selenium webdriver

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

python:sys上的语法无效

我是Python的新手,
我尝试使用代码执行文件:

import sys
def main():
    print sys.argv[1]

main()
Run Code Online (Sandbox Code Playgroud)

对于此运行:从命令行获取hello.py,但得到了

C:\Python34>hello.py
File "C:\Python34\hello.py", line 4
print sys.argv[1]
        ^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)

有人可以帮我解决这个问题吗?

python sys

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

如何使用groovy在soap ui中发送多个请求

我必须在soap ui中使用variable.as运行xml请求.我知道使用groovy脚本是可能的.我的变量($ variable)应该是这样的:

for (i = 0; i < 5; i++) {
createResult(34620000+i)
}
Run Code Online (Sandbox Code Playgroud)

请求看起来像:

SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:xmethods-delayed-quotes">
<SOAP-ENV:Body>
 <wq:test>
  <Date xsi:type="xsd:string">2015-01-26</Date>
  <Data ..."$variable"...</Data>
 </wq:test>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)

有人可以帮我发送这样的请求.或者可能有另一种方式发送多个请求?

xml groovy soapui data-driven-tests

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

选择拥有2名以上员工的城市sql

我需要选择名称为"ged"的两个以上员工的城市,并按部门订购.这是我的表格

empl            
 ide    fn  ln  debt
  43    ged trt 43
  73    ged res 43
 456    k   hjkhg   0
 532    kkhg    gfgf    23
  45    k   gdfg    79
 243    hj  vjv 78
 354    ged vt  78
 3421   ged vt  78

depart  
debt    city
  43    odesa
  23    kiev
  79    lviv
  78    lviv
Run Code Online (Sandbox Code Playgroud)

我写了这样的代码

select  depart.CITY from depart inner join  empl on empl.DEBT=depart.DEBT
where empl.FN='ged'
group by empl.FN, depart.CITY
having count(empl.FN)>=2;
Run Code Online (Sandbox Code Playgroud)

但它只给了一个城市 - 敖德萨

sql database

-1
推荐指数
1
解决办法
1558
查看次数