Re: RE: Canoo- Webtest query- need help with < storeElementAttribute > XML property
Michael Habbert <[email protected]>
| Newsgroups | gmane.comp.web.canoo.webtest |
|---|---|
| Message-ID | <[email protected]> |
Hi Milind Kamu,
first of all: please do not write to my private Email -> use the
Webtest-List. Thanks
I do now understand more what you want to do, not why. But anyway your
task is on the edge of the capability of what webtests can do.
Testing visual features of a web-application is not the main ability of
webtest.
-----
First of all: I do not have experience by my self with this webtest
taks: mouseOver
1. You have to be sure that your xpath is right!
2. Check the value of the xpath-element before you use the mouseOver task.
3. Sometime we did experience some time-lag in testing a web-application
with canoo webtests. Although I do not thing this is the case here try
to wait some time before you check the changed values.
---
But by the way the first advice is the most important one!
Your Xpath:
"/html/body/div[3]/div[2]/section/div/header/div/nav/div/div/ul/li/a" is
not a distinct xpath-expression for your test-page.
My firefox-Plugin says that 3 elements match this xpath - so what do you
want canoo webtests to do with three different elements you put mouseOver.
May be you should identify your element (mouseOver) with xpath and
verify or store a value with the same xpath expression and not by name.
Good luck with your testing
Michael Habbert
Am 12.07.2013 07:52, schrieb Milind A. Kamu:
> HI Michael,
>
> I am not sure if my earlier email attachments were received by you due to the email size constraints.
>
> Resending some of the text contents:
>
> Test Scenario i am automating:
> -----------------------------------------------------------------------------------------------------------
> 1) Access URL : www.chase.com
> 2) I am trying to performa GUI test on this page. “Personal” link in particular, which is on top left of the screen.
> 3) I would like to do a “mouseOver” action on the “Personal” link and capture the links GUI attributes after the mouse over happens. For this test I am interested in capturing “color” , “background-color” and “text-decoration” properties after performing the “mouseOver” action. These properties are not the same before the mouseOver action. Hence its essential to capture these attributes after a mouseOver action is performed.
>
> -----------------------------------------------------------------------------------------------------------
> This is the html code of the link i am looking at:
>
> <a class="categoryLink_0 chaseanalytics-track-link selected" data-pt-name="hd_personal_home" href="https://www.chase.com" data-category="personal">
> Personal
> <span class="accessible-text"> home page (current section)</span>
> </a>
>
> -----------------------------------------------------------------------------------------------------------
> Please Note in the above HTML code, there are no GUI attributes listed such as “color”, “background –color” and “text decoration” . All of those attributes are listed in a separate css file.
> I do not know of a way to access those properties from the Css file.
>
> Here is the Css file we have.
> -----------------------------------------------------------------------------------------------------------
> .main-header .static-nav .static-nav-wrapper a:hover {
> color: #004566;
> }
> .main-header .static-nav .static-nav-wrapper a.selected {
> border-bottom: 1px solid #FFFFFF;
> font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
> font-size: 10px;
> font-weight: bold;
> }
> a:focus, input:focus, p:focus {
> outline: thin dotted #000000;
> }
> a:hover {
> text-decoration: underline;
> }
> :-moz-any-link {
> cursor: pointer;
> }
> li {
> text-align: left;
> }
> ul, li {
> list-style: none outside none;
> }
> body {
> word-wrap: break-word;
> }
>
> PLease find the XML file created for this Test. This will basically perform a “moouseOver” action and then try to capture the updated GUI attributes after the mouseOver happens on the “Personal” link .
> Current <storeElementAttribute> is returning me a “undefined” value message .
>
> -----------------------------------------------------------------------------------------------------------
> <?xml version="1.0"?>
> <!DOCTYPE project SYSTEM "../dtd/Project.dtd">
> <project default="test">
> <target name="test">
> <webtest name="check that WebTest is Google's top 'WebTest' result">
> <config>
> <option name="JavaScriptEnabled" value="false"/>
> </config>
> <invoke url="https://www.chase.com"/>
> <setInputField name="QueryText" value="mobile banking"/>
> <clickLink description="Click link: " htmlId="swatsearchid"/>
>
> ----------------------- TEST CASE FOR GUI TESTING THE LINK STARTS HERE --------------------------------------------------------------------------------
>
> <invoke url="https://www.chase.com"/>
> <mouseOver description="Mouse Over Personal Link: " xpath="/html/body/div[3]/div[2]/section/div/header/div/nav/div/div/ul/li/a"/>
> <storeElementAttribute xpath="/html/body/div[3]/div[2]/section/div/header/div/nav/div/div/ul/li/a" attributeName= "text-decoration" propertyName="colorFinal1"/>
> <verifyProperty name="colorFinal1" text="underline" />
>
> ----------------------- TEST CASE FOR GUI TESTING THE LINK ENDS HERE------------------------------------------------------------------------------------
>
>
> </webtest>
> </target>
> </project>
>
>
> thanks in adavnce for yout ime..
>
> Milind Kamu || PMP
> M P H A S I S, an HP Company | IT Services
> Address: MphasiS USA, 3350, PLAYERS CLUB PARKWAY, SUITE 125, MEMPHIS, TN 38125
> Tel: 988-678-3976 (Cell)
>