Is there any way to set & bypass default value to the captcha? - webdriver

Currently i am want to automate the banking application (with the selenium web-driver) in which more use of captcha. i know very well captcha is used to prevent automation & there is one way to block the captcha functionality from testing environment & do the work.
But my Question is that, is there any way to set & bypass the default value to captcha, so that we can automate the captcha functionality without hiding the captcha code?
Thanks in advance for your valuable suggestions.

I think you need to ask whoever wrote the banking application.
If it is possible for a user to bypass the captcha through the web front-end then webdriver should be able to automate it fairly easily. If it's not possible for a user to bypass it, then webdriver may be able to do something clever with javascript. But it all depends on what the application allows.
If there are hidden inputs which can be used to bypass the captcha for example, then WebDriver deliberately can't interact with them, but custom javascript can. However the point of captchas is to make it impossible to for an automated script to get through, so no well-designed captcha would have such an obvious loophole.

Related

Is it possible to disable Google Tag Manager in a SPA after a user logs in?

I have a React app and want to install Google Tag Manager on certain pages, but I do not want it present after a user logs in. Is it possible to disable / remove the GTM scripts after a certain user action?
I am using react-gtm-module to install Google Tag Manager but open to other options.
Well, this, basically, answers it: How to unload a javascript from an html?
But a better answer would probably be: don't unload GTM. It's not a good practice. It adds a lot more complexity to your overall logic. People don't expect someone to arbitrarily override deployed scripts' namespaces. It's very likely to cause havoc at some point and it's unlikely the one to debug it would be thankful to you for a thoughtful implementation.
Instead, consider using blocking triggers within GTM to just prevent certain tags from firing.

How to improve ASP.NET web application performance?

To be more specific... When someone clicks a link on my web application, can that user be redirected immediately after the click and then wait for the page (user controls) to load. (Can the user controls load one by one with a priority or something?)
Right know, there is a delay after the user clicks on a link and then gets redirected.
Things you can do:
Check how you're using the ViewState if you're not careful it gets
quite big. But some parts of your app might be depending on it so
it's kind of situational.
Caching of pages or just controls
AJAX - while it doesn't feel as natural as in the MVC, it's still an option
for Web Forms
Script & Css bundling and minification - less requests
for more data are always faster then more requests for less data
These are things I'd start with. From my experience excesive ViewState is the place where you can gain the most but a usually it takes quite some effort to get rid of it since just turning it off might make some of your controls not working properly on postback.
This is just a start but going deeper would require much deeper knowladge of the application.
You could use AJAX technology to create the required responsiveness of your application.
In fact, you only need one page. You could load all actions performed (and the updated HTML/JS) using AJAX.
I would advise to read into that subject. You could use jQuery or similar frameworks to do the communication with the web server.
Required reading: ASP.NET AJAX.
My advice is to try to redo your application with AJAX approach:
here is a smart article about it http://www.asp.net/mvc/overview/older-versions-1/nerddinner/use-ajax-to-deliver-dynamic-updates
Take a look to AJAX technique: http://en.wikipedia.org/wiki/Ajax_(programming)
From what I understand, you are using classic Asp.NET and therefore, webforms.
One way to speed things would be to switch to the Razor platform, which eases things a bit (by preventing unnecessary postbacks).
Alternatively, if you don't want to remake the whole application, you could use a simple html link instead of an asp:hyperlink.

Is there any way to run code on the client in ASP.NET?

As the title says, how would I go about doing this? I want to check a value stored in a file.
This is impossible and has nothing to do with ASP .NET. The browser is responsible for rendering the page to the client, and browsers, for obvious reasons (security), don't have access to the user's file system. The only thing a browser can do, is read cookies (essentially text files) sent to the user from the same domain the website belongs to.
HTML5 has a new feature called local storage but you still won't be able to access ANY file on the user's computer.
Using Javascript with ASP.Net applications can work quite well, I've done it for a couple of sites I've done. If you just want to run some code on the client when a checkbox is ticked for instance, try this...
replace the myFunction() portion out with whatever client side code you want to write.
If you unfamiliar with Javascript as a language, check this out... http://www.w3schools.com/js/default.asp
You can do that using ActiveX control or SilverLight
Some are saying it's not possible, and that is true for the Internet. However, I have done this before on an Intranet system. The server knew the users computer name and could access a local configuration file, no ActiveX, no Silverlight.

asp.net login module vs own login

Can anyone tell me what the benefits and disadvantages are of the ASP.net login module and building your own login? Or links to where I can get more information.
Thank you!
Further to what talljoe said it is less work and also standardised which will help anyone else that comes in need to make changes.
Unless you need some specific function that the control doesn't have, there's no real need to write your own.

DotNetNuke - Plain text to Encrypted/Hashed passwords

I've inherited a DotNetNuke site that was built and managed by someone who thought storing user passwords as plain text was a good idea because he could easily look up a password and tell the user what it is if they forgot it and to log in as them if they had an issue. After recovering from my heart attack at discovering this and getting my mind to navigate away from the idea of how stupid that is, I need to fix it.
I know to change the web.config settings to use the correct password configuration, but was hoping someone else that's had to do this with a DotNetNuke site might provide some guidance on the best way to approach this. Should I just use standard .NET code and write an app to cycle through them and change them or do I need to use the DotNetNuke user objects? Any article links or sample code would be really helpful. I've found posts about doing this generally but not in the context of a DotNetNuke site and am unsure if there's any special considerations I need to take into account.
Sadly there isn't any real documentation that I'm aware of that would handle this. My recommendation would be to make the web.config change to hashed. After doing this user resets will start using the new format.
You could then write a simple module that grabs all users with plan text and resets their password using the ChangePassword API call from the UserController API. It isn't elegant but would get the job done.

Resources