SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
346 stars 194 forks source link

selenium ide cannot set format timeout in php properly from html #1192

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 1192

What steps will reproduce the problem?
1. open selenium ide
2. add command setTimeout and target 120000
3. choose menu Options>Format>PHP

What is the expected output? What do you see instead?
Expect:
// arg in setTimeout should be int
// $second should be 120
$this->setTimeout(120000);
    for ($second = 0; ; $second++) {
        if ($second >= 120) $this->fail("timeout");
        try {
            if ("OpenPublish installation complete" == $this->getText("//div[@id='squeeze']/div/div/h2"))
break;
        } catch (Exception $e) {}
        sleep(1);
    }

What I see:
$this->setTimeout("120000");
    for ($second = 0; ; $second++) {
        if ($second >= 60) $this->fail("timeout");
        try {
            if ("OpenPublish installation complete" == $this->getText("//div[@id='squeeze']/div/div/h2"))
break;
        } catch (Exception $e) {}
        sleep(1);
    }

What version of the product are you using? On what operating system?
Selenium IDE 1.0.10
Ubuntu 10.10

Please provide any additional information below.
Firefox 3.6.13
PHPUnit 3.4.14 + Selenium RC

Reported by helmi03 on 2011-01-13 04:16:42

lukeis commented 8 years ago
This is actually two issues as you point out (which makes it hard to comment on one
or the other...)

setTimeout:
- Testing/Selenium takes setTimeout as a string
- PHPUnit's Selenium extension takes setTimeout as an int

expected timeouts:
- ok; thats a bug, but at least it is a consistent one throughout all the formatters
and not just the php one. its also not one I don't think can be solved [given the current
implementation of formatters] as the timeout value is not necessarily available to
the formatter. (But let me poke around and see if I stumble on something brilliant)

Reported by adamgoucher on 2011-01-21 03:18:21

lukeis commented 8 years ago
ok, fixed the setTimeout problem by actually supporting both phpunit and testing_selenium.
ugh. what a nightmare this is becoming. anyways, until the next official release of
se-ide, you will want to run stuff straight out of bamboo...
- se-ide: http://xserve.openqa.org:8085/browse/IDE-EDITOR
- php formatter: http://xserve.openqa.org:8085/browse/IDE-PHP

that, for me at any rate, let me have setTimeout as a string or an int depending on
which php driver i was using.

Reported by adamgoucher on 2011-01-21 04:54:11

lukeis commented 8 years ago

Reported by jari.bakken on 2011-04-22 10:03:36

lukeis commented 8 years ago
fixed in comment 2

Reported by david.burns@theautomatedtester.co.uk on 2011-08-31 14:34:48

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:11:49