Dear Adrian,

Please have a look at:

http://comments.gmane.org/gmane.comp.web.canoo.webtest/9604

So you are not alone ;-/

The JavaScript-support of webtests is done by htmlunit:

http://htmlunit.sourceforge.net/changes-report.html

Since htmlunit-2.5 the method: getElementsByClassName is supported.

But unfortunately my lokal webtest-installation uses htmlunit version 2.3.

So from my point of view - you are doomed.
The migration from one htmlunit version to the next is more work than 
exchanging the jar-files.

With kind regards

Michael Habbert



Von: Adrian Durn [mailto:[email protected]]
Gesendet: Mittwoch, 9. September 2015 18:20
An: [email protected]; Habbert, Michael (Key-Work) 
<[email protected]>
Betreff: RE: Help needed with invoke

Hi Michael,

Below is the test and result of said test. Under resulting page it is 
displaying the page I am expecting to be displayed.

The system is built upon cakephp and has URL rerouting based on the controller 
used.

Localdev is simply pointing to 127.0.0.1 and the appropriate webroot, I can 
browse to localdev from a browser fine.

Just being able to invoke and skipping the pass check would be ideal at this 
point.

Is this enough?

Adrian

            <webtest name="Find Test CRM">
                  <config browser="firefox3" haltonfailure="false" 
failureproperty="true" host="localdev" port="80"/>
                  <steps>
                        <invoke url="/users/login" description="Invoke local 
CRM"  />
                  </steps>
            </webtest>

[x] Find Test CRM
Test started at Wed Sep 09 17:08:57 BST 2015, lasting 891 ms.
Source: c:\myWebTestProject\tests\CRMdevtest.xml:9:
Base URL (used by invoke steps with a relative URL): http://localdev/
#

Result

Name

Parameter

Duration

  1

[x]
Error
Page<001_response_invoke.html>

invoke
Invoke local CRM
Resulting page<001_response_invoke.html?baseUrl=http%3A//localdev/>

-> complete url

http://localdev/users/login

url

/users/login


891

Error
Message

JavaScript error loading page http://localdev/users/login: TypeError: Cannot 
find function getElementsByClassName in object [object HTMLDocument].

Location

c:\myWebTestProject\tests\CRMdevtest.xml (line: 12)

Page source looks like:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";>

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
<title>

        CRM Development:

        Users    </title>

    <!-- CRM VERSION: 5.17.2 -->

    <CSS stuff />

</head>




From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Habbert, Michael (Key-Work)
Sent: 09 September 2015 12:55
To: [email protected]<mailto:[email protected]>
Subject: [Webtest] AW: Help needed with invoke

Hi Adrian,

Please provide an example and a complete stacktrace. Its much easier to help so.

Cheers

Michael Habbert

Hello,

I am in desperate need of help with Webtest. It potentially will save me a lot 
of trouble and is almost perfect for what I need it to do, however, I am having 
trouble using the Invoke step.

After invoking a page the test is failing, this happens constantly, regardless 
of the whether pointing local, test or live. The page is loading properly, I 
can see in the test results page that it is displaying correctly. Is there a 
way of of forcing the invoke stage to come back as green?

Adrian Durn


Michael Habbert
Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 Karlsruhe | Germany | 
www.key-work.de<http://www.key-work.de>
Fon: +49-721-78203-269 | E-Mail: 
[email protected]<mailto:[email protected]> | Fax: 
+49-721-78203-10

Key-Work Consulting GmbH, Karlsruhe, HRB 108695, HRG Mannheim
Geschäftsführer: Andreas Stappert, Tobin Wotring

Reply via email to