Page 1 of 1

Problem when accessing different Webpages

Posted: Fri Oct 18, 2013 3:35 pm
by chsibi
Hi,
I try to do some automatic generation of actions on serveral websites.
But it seems to be so, that the elements of the browser are different on each website, such that the same button can't be found when one time I surf to e.g. heise. de and the other time to heise. de/thema/iPhone.

To be more concrete:
I recorded the following 2 actions:
-open browser (I tried FF and IE9)
-click on x at upper right to close browser

I then edited the url of the "Open Browser"-Action to a variable and bound them to an xls file containing several domainnames (in my case:
heise. de/
heise. de/newsticker/meldung/MacBook-Air-Apple-warnt-vor-SSD-Datenverlust-1981419.html
heise. de/thema/Windows-8
heise. de/thema/iPhone
heise. de/thema/Google-Nexus
(url edited because of lmitations of new account)
)
If I try to run the testcase with these 5 iterations now, Ranorex Studio (4.1.0.25227) just waits endless after the browser is started and the x to close the window should be clicked.

Help appreciated very much and thank you in advance
Chris

Re: Problem when accessing different Webpages

Posted: Tue Oct 22, 2013 5:05 pm
by Support Team
Hi Chris,

I would suggest watching the screencasts about the RxPath, they will be beneficial for you.
Here is the link: Screencasts.

Regards,
Markus

Re: Problem when accessing different Webpages

Posted: Thu Oct 31, 2013 9:38 am
by mdgairaud
Hi,

I use Rx to run test over Firefox and InternetExplorer and the RxPath of the browser controls are different between browser, it also happens with combobox and many other controls.

You must record a close action for each browser and use the correct one with it's browser.

I use something like this:

Code: Select all

if(browser == "IE")
{
    Mouse.Click(repo.IEBrowser.Close);
}
else
{
    Mouse.Click(repo.FFBrowser.Close);
}

regards,
Mateo.

Re: Problem when accessing different Webpages

Posted: Thu Oct 31, 2013 1:19 pm
by Swisside
I tried it out it seems to be working fine for me

(I only tried for two addresses because I'm lazy)


Regards


Boris

Re: Problem when accessing different Webpages

Posted: Thu Oct 31, 2013 1:28 pm
by krstcs
If your test case is not focused on using the "X" button (which in this case it probably isn't since you probably aren't testing IE or Firefox directly), then you should not use a "CLICK THE X button" type action to close your SUT. You should use the "Close Application" action on your SUT's /dom adapter. This will ensure that it is closed correctly, no matter what browser you are using.