Translate

Friday, July 29, 2016

Selenium IDE Workarounds

Last blog post I wrote about the fireEvent command and the basics with it. Today the topic is workarounds. One of the major workarounds I have found is with the fireEvent command. If the click or the mouseover or the mousedown commands are not working you can always use the fireEvent command.
One of the best things I have found to create workarounds is using logic. You can mimic almost anything you would like to do with combinations of other commands. For example, if you need to drag and drop something and the command is not working for some reason you can use the mousedown command with the mousemove or the mouseup commands or similarly if the those commands aren’t working, you can use the fireEvent command to mimic those commands.

Another way to workaround various issue is learning JavaScript. You can run snippets of JavaScript in IDE which allows you more variety in the possibility of actions



If you have any questions or comments please leave them below.

3 comments :

  1. while my test case test to project with step by step,one of steps click a button and after that open new tab. That's OK but test case steps go on work on previous tab.I want it to work on new tab.

    Have a idea?

    ReplyDelete
    Replies
    1. Unfortunately, Selenium IDE does not do this very well. I have found select popup is the only way to do this and even then it is not a sure way.
      A way I found around that is that of having it open a new window vs open a new tab. This is something Selenium IDE can do much better.
      You can this by changing the setting in Firefox so that it will automatically open new windows instead of new tabs. then you can use the selectpopup command

      Another way to get around this is to make test cases similar to methods. If you open a new window and then switch test cases it can a lot of time solve this problem, but this is not a 100% of the time fix. I have found it only works in some cases

      Delete
  2. This is very informative blog and nice article , I really like your technique of writing a blog. I book marked it to my bookmark site list and will be checking back in the near futureselenium training,selenium online training,selenium training online,selenium free course

    ReplyDelete