「已注销」 2017-10-25 14:50 采纳率: 0%
浏览 2252

自动化脚本---QQ空间发说说

最近想要编写“QQ空间自动发说说的脚本”
不过,编写到一半,卡住了
特来寻找帮助

以下代码是我编写的,可以进入到空间的主页
但我不会定位那个说说输入框

package com.baidu.way;

import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Test {

public static void main(String[] args) {

// Ways w = new Ways();
//

// w.OpenFirefox("http://www.baidu.com/");

    System.setProperty("webdriver.firefox.bin", "G:\\FireFox\\Fox\\firefox.exe");
    WebDriver w = new FirefoxDriver();

// w.get("https://www.baidu.com/");
w.navigate().to("https://user.qzone.qq.com/1823164829/infocenter");

    w.switchTo().frame("login_frame");
    w.findElement(By.id("img_out_1823164829")).click();

// w.switchTo().defaultContent();

    // w.findElement(By.className("textinput textarea c_tx3")).sendKeys("爱");;

}

}

附加我最后一步的图片O(∩_∩)O~
图片说明

  • 写回答

1条回答 默认 最新

  • JavaBuilt 2017-10-26 01:07
    关注

    需要获取说说页面 说说输入框的input对象,然后将你想输入的信息通过ajax反馈给说说页面,说说页面 如果用javascript写 :input.innerHTML = "你想输入的内容"
    如果用jQuery写: input.html("你想输入的内容");

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器