English 中文(简体)
如果某个箱子没有被检查,如何在 se中形成一种说法?
原标题:How to create an if statement in selenium that would run if a certain box was not checked?

我试图做这样的陈述,即核实是否检查了检查箱,以及是否没有采取某种行动。 审判

if (selenium.verifyChecked("checkbox")=false){
//perform actions
} else {
//perform different actions
};

它说,这并不奏效。 你们怎样做?

最佳回答

页: 1

if (selenium.isChecked("checked")) {
  //perform actions
} else {
  //perform different actions
};
问题回答
if (selenium.verifyChecked("checkbox")=false){

是错误的。 它对这项职能的收益价值作假,这显然是错误的。

应当:

if (selenium.verifyChecked("checkbox") == false) {




相关问题
Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

What approach should I use to test a VBScript?

I ve been asked to help out with a project which has made extensive use of VBScript to process a whole bunch of text files and generate certain outputs - sanitized files, SQL entries etc.. The script ...

Integration Testing for a Web App

I want to do full integration testing for a web application. I want to test many things like AJAX, positioning and presence of certain phrases and HTML elements using several browsers. I m seeking a ...

Best practice approach for automated testing

This is a very strange request for advice for which I truly feel there is no real answer. In my project I have archiving routines on various objects that have been consumed for logical calculations, I ...

Jython exception handling within loops

I am using Marathon 2.0b4 to automate tests for an application. A shortcoming of wait_p, one of the script elements provided by Marathon, is that its default timeout is hardcoded to be 60 seconds. I ...

Is there any error checking web app cralwers out there?

Wondering if there was some sort of crawler we could use to test and re-test everything when changes are made to the web app so we know some new change didn t error out any existing pages. Or maybe a ...

热门标签