How to select listbox or dropdown item with incremental value

If we need to select a category from a list box with incremental value.
i.e there is an item "Videos(29)". In the next time of execution it becomes "Videos(30)","Videos(31)" etc..
If we select the id, It will fail the case.
Following approach will be help full to handle this:
Getting the current value and stored it, Then stored value has been passed for selection.
String ct1 = selenium.GetText("//option[@value='4641']"); 
selenium.AddSelection ("ctl00_mainContentPlaceHolder_lstCategory",ct1);

12 comments:

  1. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium

    ReplyDelete
  2. Advanced Selenium Framework Training in Chennai by Vishwa

    Hi, Reach Mr.Vishwa for Best Selenium and Coded UI Training in Chennai with real time project assistance. This people will teach everything from the basics up to advanced level scenarios from frameworks.

    I learned from Mr.Vishwa and Raj they are very good automation people for Selenium Frameworks. After joined with them I learned many things and now I am writing automation scripts in own project. Vishwa 9003085882
    selenium training in chennai

    ReplyDelete
  3. Thanks for sharing great information in your blog.

    Selenium training institute which provides Real Time Hands on Training…THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/


    contact-8122241286

    ReplyDelete
  4. THE CREATING EXPERTS is one of the leading training provider in SELENIUM they provide hands on training with real time scenario

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  5. The Creating Experts provides training in SELENIUM

    They provide hands on training with real time scenarios

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  6. Nice blog...The Creating Experts provides training in SELENIUM

    They provide hands on training with real time scenarios

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  7. SELENIUM training in Chennai by TE CREATING EXPERTS ,they provide you hands on training with real time scenarios

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact 8122241286

    ReplyDelete
  8. SELENIUM training in Chennai

    http://thecreatingexperts.com/selenium-training-in-chennai/

    SELENIUM training in Chennai by THE CREATING EXPERTS ,

    They provide you hands on training with real time scenarios

    contact 8122241286

    ReplyDelete
  9. Hi, all nice blog for a long time i was searching for a real time trainer and landed with my trainer in selenium
    SELENIUM training is provided by THE CREATING EXPERTS in CHENNAI

    http://thecreatingexperts.com/selenium-training-in-chennai/

    Contact 8122241286 for more info

    ReplyDelete
  10. Nice blog...

    Selenium training institute which provides Real Time Hands on Training…THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/


    contact-8122241286

    ReplyDelete
  11. NICE BLOG...Selenium training in CHENNAI provided by THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/

    CONTACT 8122241286.

    ReplyDelete
  12. Very Nice...Contains A to Z concepts...Thanks a lot.. and looking for the best selenium training in Chennai with certification from us. we have experienced selenium experts offer selenium course training with industry exposure. Check Here https://goo.gl/VRNEXv

    ReplyDelete