单击wordpress登录页面上的按钮

时间:2016-10-18 11:19:39

标签: powershell button login submit

单击下一页上的登录按钮时出现问题:

https://community.theme.co/wp/wp-login.php

我尝试点击下面带代码的按钮:

import java.util.Arrays;

public class GenericExample {

int index1;
int index2; 

public static <T> T [] swap(T[] array, int index1, int index2)
{
    T temp = array[index1];
    array [index1] = array [index2] ;
    array [index2] = temp;

    return array;

}

public static void main(String[] args) {
    Integer [ ] array = {1, 2, 3, 4};
    System.out.println("Array is: " + Arrays.toString(array));
    swap(array,1,3);
    System.out.println("Array is: " + Arrays.toString(array));
}

1 个答案:

答案 0 :(得分:-1)

我认为检查对象的繁忙属性可能会修复它。

$url= "https://community.theme.co/wp/wp-login.php"
$ie = new-object -ComObject "internetexplorer.application"
$ie.Navigate2($url)
$ie.Visible =$true
while($ie.Busy){
start-sleep 10
}

$submitButton = $ie.document.getElementById("wp-submit").click();

无法确认,因为我没有任何有效的凭证,但我认为点击发生了