Quality Testing

Quality is delighting customers

Hi all,  Please share your challenges faced using selenium and how to over come it.........

Thanks!

Lokesh

Views: 13836

Reply to This

Replies to This Discussion

Hi all,

Below are the challenges while learning Selenium.

1. handling popups

2.Switching between windows

3.Working with frames.

4.Field validation

5.How to identify dynamic objects.

6.Xpath and CSS locators for identifying elements.

Please send some sample scripts if u have any for the above problems.

Thanks,

Madhavi

how did u solve them .....
Does any one know examples for the above questions

All Above Challaeges with I have been Faced and all are Resolved.

- File Upload/Download Using : Java-AutoIT-Selenium

- Handling Multiple Popup Windows.

- Switching with multiple Windows.

 

Please use CSS locator instead of XPath which is too Fat for automation.

For Any doubts or discussion please send mail : girijant@gmail.com

 

Thanks,

-Girija

 

I am not sure if you are using Selenium IDE or Selenium RC but it is always better to have SATF which can help you in long run to get answers of challenges you have mentioned.

I am trying to answer solution for challenges you have mentioned based on my knowledge of selenium.

1. handling popups/ Switching between windows/ Working with frames:

You can write AutoIt script and embed it in your framework code to handle windows components.

2. Field validation: What kind of problems you are facing in field validation?

3. How to identify dynamic objects.

You can use Xpath object locators instead of using id or name.

 

Also, please describe your challenges with example or in detail so, those can be answered correctly.

 

hello chintan

what is  SATF?

Hi Chintan,

 

Please send me sample script for uploading files and handling popups by using Auto IT...

 

Thanks in advance

Naga

did u get any scripts
Hi Anushri,
Nope I didnt got any scripts will post once I get any.....
Lokesh
I'll start by asking whether the OP has done UI automation before.  There are a lot of things we could discuss around the general subject of UI automation.  Or are you asking specifically about Selenium?
Yes, I'm asking specifically about Selenium .

I am a software developer.  I write tests using Selenium's Java API.  I think the API is straightforward, and for the most part it does what it is supposed to do.  (I actually write my tests in Clojure, which is a Lisp that runs on the JVM and can call Java methods.)

 

In Selenium, you identify a UI element with a locator.  There are many kinds of locators, e.g.IDs, names, and XPaths.  If you have never used XPath, you should expect to invest some time familiarizing yourself with it.  On Firefox, Firebug and Firepath are invaluable for inspecting the DOM and figuring out locators.

 

On common problem with UI automation is dealing with timing issues, e.g. you press a button and it takes an indeterminate amount of time for the web page to refresh.  You can try hard-coding delays into your test or you can tell Selenium to wait for a element in the page to appear.  I recommend the latter.   I don't remember what the API is for that, but I imagine someone here can speak up about that.  

 

Another recurring problem I've had, and which shows up repeatedly on the Selenium forums, has to do with tabbing between fields.  Selenium has APIs for filling in a text field and clicking a button, but it doesn't have an explicit "hit the Tab button while you're in this text field" API. The Selenium forums suggest various workarounds.  I think the appropriate workaround depends on the situation.  In my application, something special happens when the focus leaves a password field.  Under the covers, the app detects the focus leaving the field via a blur event.  I haven't figured out what action to tell Selenium to perform to cause a blur event to happen, but there is a "fireEvent" method on the Selenium interface that explicitly causes an event to fire.  That's what I use.

 

I hope that helps.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service