RPA/Selenium to Perform TIN Matching - selenium

I am trying to automate a process where I am verifying a TIN (tax id number) on the IRS website. I thought it would be easy but when I run my test - the IRS website gives me a “technical error” code 4405. If I do it manually it’s no issue. I tried to back door it using executejavascript to no avail and tried using findelement.Click to emulate a human.
Since everyone is afraid of the IRS (myself included)- I started to think maybe they are detecting an automated browser instance and maybe I breaking an agreement I click through but didn’t see any. So assuming I am compliant and maybe overthinking it, how does one get through this ? It’s happened before using Oracle EBS but I just deferred in that case.
Are web apps detecting Selenium and preventing automation ? I understand why in some cases , but how does one circumnavigate for legit cases such as automating testing. Do I have to automate through win app driver?

Yes, I believe the IRS is using/checking for automation programs such as Selenium (see Can a website detect when you are using Selenium with chromedriver?)

Related

How to bypass Captcha while Web Scraping

I am trying to scrape the car details from this site using Selenium: https://www.autoscout24.ch/de/autos/alle-marken?vehtyp=10
Approximately every 30 pages I have to verify that I am not a robot,
even though I have included in my code:
driver.implicitly_wait(20)
Is there any way to overcome this?
CAPTCHA is meant for those reasons. There is no co-relation with it being removed due to use of waits in Selenium script. The use of CAPTCHA is to detect that bots/automated systems are not crawling the web page.
Unless you disable it, I don't think that it is the right approach to automate it. Although you may find some tutorials on web to overcome it, but they are very patchy and do not cover all the use cases.
2 options come to mind on how to solve your issue, which one you'll choose depends on what you need.
Option 1 will be cheaper and probably easier, but you can just make your script wait when the Captcha is detected, and play a sound when it's shown so you can manually do the captcha yourself, after the captcha has been dealt with you can let the script continue doing it's thing.
The second option would be to use a captcha solving service, you would need to pay a little but would not need to manually do anything.
I'm not a robot
The "I'm not a robot" checkbox, commonly known as reCAPTCHA v2 is one of the security measure in practice for implementing challenge-response authentication. CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) mainly helps to protect the applications and the systems from spam and password decryption by asking to complete a simple test that proves it's a human and not a computer trying to access into a password protected account. In short CAPTCHA is implemented to help prevent unauthorized account entry.
So neither of the wait mechanism Implicit wait or Explicit wait would be of any help to avoid CAPTCHA
Solution
An ideal approach would be to disable the CAPTCHA for the AUT (Application Under Test) within Testing / Stagging environment and enable it only in production environment.
References
You can find a couple of relevant detailed discussions in:
How does reCAPTCHA 3 know I'm using Selenium/chromedriver?
How can I bypass the Google CAPTCHA with Selenium and Python?

Automating Functional Test

I am a person who works as a SW QA in Korea. I have used Jira Old Version(Local System) to Track issue out and github to manage Site Source. Now i am considering to change Test System. until now, i have had to test all function that was updated in my solution manually!!. so i start wondering how i can automate this. What i want is to test main system and sub system(function) with using program like Postman. So i hope you recommend some programs to test what i want all.
Test Priority is Automation of that below
easy use
Main Source Test
Sub(Function) Source Test
please, i will wait for your answer
I have used Jira Old Version(Local System) to Track issue out and github to manage Site Source. i want to automate all test including black box, UI function.

TestComplete import testscenario from Selenium

Maybe this sounds ridicilous, but still, is there somekind of way to convert/import/hack selenium test scenario to get work on TestComplete?
I ask this, because my boss asked me to find a way, we are using Selenium, but our customer want us to give him TestComplete scripts, so we dont want to buy licence for 1 customer and i havent find any yet and belive there is no... maybe im missing something? Thanks you and have a nice day.
There is no direct ways to convert Selenium tests to TestComplete as these tools use different principles. Selenium works with web pages "from inside" (programmatically) while TestComplete does this "outside" by simulating user actions: it sends mouse clicks and key presses to the browser.
I think that it is possible to invoke Selenium tests from TestComplete, but you will not have any results in TestComplete and you will be unable to modify tests in it.
BTW, you can request a free 30-days trial if a month is enough for you to convert the tests.

What's the simplest/easier way to do a health check/smoke test in an internal web app?

I have an intranet web application and I would like to do a simple health check/smoke that runs once an hour to make sure that everything is how it is supposed to be.
The tests are supposed to do some requests and check response for text and in some cases do one or two POSTs to see if the application in answering like it should.
I thought about using Selenium or Visual Studio's WebTest and schedule the run via CC.NET or another CI application but seems like a big shot for a simple thing.
Any ideas?
Thanks
Selenium is a good option. So is PhantomJS.
I dare to say that SWAT could be a good choice for you. It does exactly what you say - makes various http calls and check data returned, also it is possible to pass the test results to different report systems, using TAP format which swat is compliance with. And finally there is a simple DSL to write such a checks.
Regards, the author.

Software Automation tool

At my company, we have to fill out a daily timecard, and I want to automate it.
I want to use some sort of tool that will allow me to write something like this:
Launch Firefox
go to www.example.com/timecard
Wait for page load complete
In UserName box: put username
In Password box: put password
Press enter
Wait for page load complete
if login failed
email me#example.com that unable to automatically do timecard, please check password
return;
Get today's date
if today is Saturday or Sunday
close firefox
return;
find the timecard column that matches today's date
find the row with the right charge number
put in 8.0 hours
click "Save" link
close firefox
return;
It would be really nice if the software solution will also execute itself daily at a given time.
Since you are asking about UI automation you might want to check out AutoHotKey.
It's a macro language and you can compile the code into executable binaries (.exe).
However, sending web request could be done better without a browser by sending the necessary HTTP requests. Such an approach is more light-weight, more flexible and probably easier to maintain as well.
Check out the Chickenfoot extension for Firefox. I believe it may help you a long the way.
Chickenfoot is a Firefox extension that puts a programming environment in the browser's sidebar so you can write scripts to manipulate web pages and automate web browsing.
It also provides a basic record feature, and you can then fine-tune the interactiosn with the web page(s).
If all you need to automatize is related to browsers, then you may try out Selenium Remote Control which provides libraries in different languages.
For browser automation, there are a couple more experimental libraries in javascript (you should search for web app testing tools as these are imo your best bet for now)
./alex
For decision making, you might have to write some code.
iMacros for firefox has the ability to record/playback.
I have not used it myself but I have heard good things about Selenium. This is a Web UI testing tool that can be scripted in a number of different languages.
I would try to accomplish this with twill.
If by "some sort of tool" do you mean something like a programming language or environment that will allow you to automate what FireFox does? If so, I recommend learning how to write a FireFox extension. Extensions are written in Javascript. See https://developer.mozilla.org/en/Extensions
--
bmb
You could use selenium or watin on a simple .net console program. Then configure a task on window to call it at a given time of day.
If you are using Linux you could easily do this with a bash script of some kind. Have a look at the CURL library.http://curl.haxx.se/. You could then schedule the script to run with cron.
This is why I love Linux, the above is simple to do. I windows I suppose you could use the windows shell. I think the curl library runs on windows.
Selenium (www.openqa.org) tools will work for you. Install the Selenium IDE and record the macro. The "code" is simple JavaScript/HTML.
Selenium RC provides a very strong solution for automated testing from a variety of languages and tools.