RE: RE: Canoo- Webtest query- need help with < storeElementAttribute > XML property
"Milind A. Kamu" <[email protected]>
| Newsgroups | gmane.comp.web.canoo.webtest |
|---|---|
| Message-ID | <EED83EAFDDF3C1428AF9329E7E84992D556ED6B0@MPDAMBX02.corp.mphasis.com> |
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)
________________________________________
From: Milind A. Kamu
Sent: Thursday, July 11, 2013 8:48 PM
To: [email protected]; Michael Habbert
Subject: RE: [Webtest] RE: Canoo- Webtest query- need help with < storeElementAttribute > XML property
HI Michael,
Thank yoy very much for looking into my query.
Apologies for not being very clear in my problem definition. Here are the detailed steps of the issue i am facing currently.
please assit me, thanks in advance.
regards,
Milind Kamu || PMP
Address: Mphasis an HP company, 3350, PLAYERS CLUB PARKWAY, SUITE 125, MEMPHIS, TN 38125
________________________________________
From: [email protected] [[email protected]] on behalf of Michael Habbert [[email protected]]
Sent: Thursday, July 11, 2013 11:46 AM
To: [email protected]
Subject: Re: [Webtest] RE: Canoo- Webtest query- need help with < storeElementAttribute > XML property
Am 11.07.2013 05:07, schrieb Milind A. Kamu:
> 1) Step 1: Check for a specific link on the page
How do you want to identify the link? Which part of your webtest-xml
belongs to this step?
> 2) After finding the link, perform a "mouseOver" action on it
What is the html-code like of the link, what will happen on that
mouse-event? Why would you do that?
> 3) Capture certain properties like "link color", "text decoration" ,
> font etc...
Please show us the html-code you want to capture (store in a property
for example).
> 4) in order to perfomr step-3, i have used < storeElementAttribute >
Sounds like a good idea, as far as I can imagine without sufficent code
examples.
> 5) When i see the attribute values using"Fire Bug", HTML file doesnt
> have these properties listed under it, instead it is listed in a
> separate CSS file, and the properties are visible under the FireBug tabs
> "Style, "Computed", "DOM" etc..
You have to understand the html-code - fire bug - only can help you
develop the first step. writing a good webtest needs more ...
> 6) I need help in understanding how to retrieve such properties which
> are loctaed inside teh CSS file.
Why do you not provide the css code?
> 7) Currently the HTML file has the below snippt of the link i am trying
> to refer to:
This snippet is fare beyond showing you material to make us able to
understand you task.
With regards
Michael Habbert
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
________________________________
Information transmitted by this e-mail is proprietary to MphasiS, its associated companies and/ or its customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [email protected] and delete this mail from your records.