我在Eclipse中使用Selenium WebDriver,我正在尝试将文本插入到网页上的tinymce框中.这是我正在使用的代码.
//find tinymce iframe
editorFrame = driver.findElement(By.cssSelector(".col_right iframe"));
//switch to iframe
driver.switchTo().frame(editorFrame);
driver.findElement(By.className("mceContentBody")).sendKeys("YOOOO");
driver.switchTo().defaultContent();
Run Code Online (Sandbox Code Playgroud)
光标在编辑器内闪烁,但不发送任何文本.我也尝试过这种轻微的变化而没有任何运气.
//find tinymce iframe
editorFrame = driver.findElement(By.cssSelector(".col_right iframe"));
//switch to iframe
driver.switchTo().frame(editorFrame);
WebElement body = driver.findElement(By.className("mceContentBody"));
body.sendKeys("YOOOO");
driver.switchTo().defaultContent();
Run Code Online (Sandbox Code Playgroud) 我在 jmeter 测试套件中使用 xpath 断言,但在处理我收到的响应中的动态内容时遇到问题。有没有办法使用我在 xpath 断言中定义的 jmeter 变量?我试过这个,但它不起作用。
/response/body/locationReports/locationReport[@deviceHandle = ${deviceHandle}]
Run Code Online (Sandbox Code Playgroud)