小编Man*_*ngh的帖子

此分发未配置为允许HTTP请求

This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests. 
Run Code Online (Sandbox Code Playgroud)

我已将网站配置为仅在令人惊叹的云端接受https.简而言之,您有一个php登录表单,并在成功登录后重定向用户,如下所示:

 if(isset($_POST['login'])){

[...]
        echo "<script>window.open('coursePayment.php?crs_id=$crs_id','_self')</script>";
Run Code Online (Sandbox Code Playgroud)

以下是表格:

 <form style="margin-top:-20px" method='post' action='' class='form-horizontal' role='form'>
       <input type="hidden" id="couponCodeLogin" name="couponCodeLogin">
        <input type="hidden" id="couponCodeLoginAmount" name="couponCodeLoginAmount">
<br><br>
 <div class="group">      
            <input type='text' class='form-control' name='email' required>
      <span class="highlight"></span>
      <span class="bar"></span>
      <label>Email</label>
    </div>

    <div class="group">      
            <input type='password' class='form-control' name='pass' required>
      <span class="highlight"></span>
      <span class="bar"></span>
      <label>Password</label>
    </div>


            <h5 style="color:#FF6400; cursor:context-menu; margin-top:0px" class="displayForgotPassword">Forgot your password? Click here to …
Run Code Online (Sandbox Code Playgroud)

html php forms https amazon-web-services

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

Maven编译错误[包org.testng.annotations不存在]

我对maven很新,我想使用maven运行我的测试类.我已经生成了testng.xml,我也创建了POM.xml文件.但是当你运行mvn install它时,会产生这个错误:

[包org.testng.annotations不存在]

请就此提出建议.

的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.TestNG</groupId>
    <artifactId>TestNG</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.1.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>

        <sourceDirectory>src</sourceDirectory>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
Run Code Online (Sandbox Code Playgroud)

的testng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" verbose="1" preserve-order="true">

    <test name="Test">
        <packages>
            <package name="com.testngTest2" />
            <package name="com.testngTest" />
        </packages>
    </test> <!-- Test -->
</suite> <!-- Suite -->
Run Code Online (Sandbox Code Playgroud)

testng pom.xml maven

16
推荐指数
5
解决办法
4万
查看次数

Maven在gitlab中发布

我们正在尝试使用maven执行maven版本.我们使用gitlab作为CI工具.问题是当我们尝试执行maven发布时,maven无法将pom.xml更新到下一次迭代.

谷歌对我的问题没有答案.我试过的是: - 试图检查试图推送的用户的权限(在回购中具有主访问权限并且分支受到保护) - 主人有权访问我的仓库中的受保护分支.

下面是我的.gitlab-ci.yml文件 -

    Maven_Release:
    stage: Maven_Release
    image: maven_Build:Latest
    script:
    - git config --global user.name "username"
    - git config --global user.email "Email"
    - git checkout -f master
    - git remote set-url origin https://gitlab.com/test1/project/${CI_PROJECT_NAME}.git
    - mkdir -p ~/.ssh
    - echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
    - ssh-keyscan -p 10022 gitlab.com >> ~/.ssh/known_hosts
    - mvn -B -s settings.xml -DdeployAtEnd=false -Dmaven.site.deploy.skip=true -Dresume=false -DautoVersionSubmodules=true -DdryRun=false -Djsse.enableSNIExtension=false -Dmaven.test.skip=true -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.0.1 -DskipITs -DscmCommentPrefix="[ci skip]" release:prepare release:perform
    when: manual
    only: …
Run Code Online (Sandbox Code Playgroud)

git maven maven-release-plugin gitlab-ci

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

如何在Windows 10上构建winium驱动程序服务?

我使用以下类代码通过WiniumDriver启动计算器.在创建WiniumDriver实例之前,我正在启动winium驱动程序服务.

import java.io.File;
import java.io.IOException;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.winium.DesktopOptions;
import org.openqa.selenium.winium.WiniumDriver;
import org.openqa.selenium.winium.WiniumDriverService;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

public class CalculatorTest {

    static WiniumDriver driver = null;
    static WiniumDriverService service = null;
    static DesktopOptions options = null;

    @BeforeClass
    public static void setupEnvironment(){
        options = new DesktopOptions(); //Instantiate Winium Desktop Options
        options.setApplicationPath("C:\\Windows\\System32\\calc.exe");
        File driverPath = new File("C:\\Winium\\Winium.Desktop.Driver.exe");
        System.setProperty("webdriver.winium.desktop.driver","C:\\Winium\\Winium.Desktop.Driver.exe");
        service = new WiniumDriverService.Builder().usingDriverExecutable(driverPath).usingPort(9999).withVerbose(true)
                .withSilent(false).buildDesktopService();
        try {
            service.start();
        } catch (IOException e) {
            System.out.println("Exception while starting …
Run Code Online (Sandbox Code Playgroud)

windows desktop selenium automation ui-automation

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