0

I am using 'Click Button' from ExtendedSelenium2Library to select Login button on my login page.

But is takes more than 12 seconds to select the Button. With Selenium2library it works immediately. I prefer using Extendedselenium2 instead of selenium2. How to make it click faster?

Saranjith
  • 11,242
  • 5
  • 69
  • 122
Smitha N
  • 21
  • 1
  • 6
  • show some screenshots and code that possibly taking too long to execute. – Saranjith Dec 05 '16 at 12:16
  • I think I know the issue here.My login page is not in Angular. As mentioned in the documentation, Click Button waits for angular to load by default. I think in those 12-14 seconds it is waiting for angular.This might be the possible reason. – Smitha N Dec 06 '16 at 06:25
  • solved? that looks good. – Saranjith Dec 06 '16 at 07:14

1 Answers1

0

TL;DR

Click Button ${button} True


Seems you already figured this out, but I had the same problem and it took some time to figure it out. So this is for future reference.

ExtendedSelenium2Library waits for AngularJs to be ready to process the next request. As can be seen here ExtendedSelenium2Library (and like you already said). So by using these commands that wait for Angular to be ready, when you are not using AngularJS, it is necessary for the timeout to kick in which is about the 12-14 seconds you experienced. To still be able to use the extended library and have "fast clicking" you need to set the argument "skip ready" to "True".

Example:

Click Element xpath=//a[@href="#/motor"]

Becomes

Click Element xpath=//a[@href="#/motor"] True

Heneer
  • 313
  • 6
  • 17