I've been trainling Watin and there's a feature that I've come across
that is really useful which I wanted to find out if it's supported by
SWEA. Basically Watin allows you to interact with html elements based
upon their ID and doesn'r require a XPATH template to be defined.
EG:
[Test]
public void SearchForWatiNOnGoogle()
{
using (IE ie = new IE("http://www.google.com"))
{
ie.TextField(Find.ByName("q")).TypeText("WatiN");
ie.Button(Find.ByName("btnG")).Click();
Assert.IsTrue(ie.ContainsText("WatiN"));
}
}
This is a very simple prog that opens IE, browses to google, finds an
element by it's name and clicks a button. All this is done without
generating any XPTH templates which has the advantage that should the
layout change, a new template doesn't need to be generated. Does Swea
offer this or is SWEA purely a template based solution?
Ash
Not all HTML elements have ID and it is also possible to have multiple
elements with the same Id. SWEA uses all possible information to identify
element: HTML name, HTML Id and XPath. The engine first tries to identify
control by using HTML name and HTML Id and only if the identification fails
it will use XPath.
Best Regards,
Alex Furman
Thanks for your reply earlier. I wanted to find out if it's possible
to develop with swea without defining htp templates? I realise that
some controls don't have id's in which case I'll need to use xpath,
but Watin gives a plathora of ways to identify a control including
regex, name, id, etc etc. What I don't want to do is keep on using the
template designer but instead want a really quick way of testing my
web applications. Is it possible to use SWEA more like Watin as seen
above without using the template designer?
Thanks
> Ash- Hide quoted text -
>
> - Show quoted text -
The SWEA project files greatly simplify development and make script more
resilient to UI changes.
The project files are part of SWEA design. The design provides more
functionality than WATIN: Visual Data Extractors, Page Identification, Code
Branching based on identified scene, Identification error tracing and etc.