Test Report 1
So, before we dive in,
I would like to address some things,
I have changed 'send_keys' as Mariusaf mentioned.
Also there were some abnormal behaviours that was inspected.
I would like to address and define them before we go in to the results.
Sorry, if the images are in Korean, but bear with me,
You will have to trust my claims on what it says.
Unusual events
1. UNEXPECTED_REGISTER_SIGNS
This event shows the text
'Unusual attempts are shown to log into your account'
and asks for your phone number or account username.
if this event happened on a NON_HEADLESS test case,
I have manually paused the program and typed in the username.
2. CONNECTION_ERROR
This event shows the text
'A problem has ocurred, No worries, this is not your fault'
Now this might be a actual connection error from twitter,
but it would be safe to assign it, if this occurs again,
I would assume that twitter is blocking.
3. BROWSER_BLOCKED
This event is very interesting.
But we will talk about that later.
4. SLOW
When the test case was
{DEFAULT_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{NON_HEADLESS},
I could see the slow response of twitter with my own eyes.
I have set the interval per actions 10 seconds in this case.
Actions that was taken with DEFAULT_CHROMEDRIVER was mostly slow.
5. SPIN
You know those spinners that spin when a page is loading?
It just won't stop spinning.
The GIF looks like it was temporary, but trust me, it was spinning all day long.
6. PASS
These test cases, I will pass.
REAL_CHROMEDRIVER is the actual browser that you normally use.
So, of course it does not go headless.
HEADLESS + MANUAL
REAL_CHROMEDRIVER + HEADLESS
TEST RESULTS
{UNDETECTED_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{HEADLESS}
SUCCESS
{UNDETECTED_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{NON_HEADLESS}
SUCCESS
{UNDETECTED_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{HEADLESS}
CONNECTION_ERROR
{UNDETECTED_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{NON_HEADLESS}
UNEXPECTED_REGISTER_SIGNS + SUCCESS
{UNDETECTED_CHROMEDRIVER}_{MANUAL}_{PROFILED}_{HEADLESS}
PASS
{UNDETECTED_CHROMEDRIVER}_{MANUAL}_{PROFILED}_{NON_HEADLESS}
SUCCESS
{UNDETECTED_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{HEADLESS}
PASS
{UNDETECTED_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{NON_HEADLESS}
SUCCESS
{REAL_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{HEADLESS}
PASS
{REAL_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{NON_HEADLESS}
SUCCESS
{REAL_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{HEADLESS}
PASS
{REAL_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{NON_HEADLESS}
SUCCESS
{REAL_CHROMEDRIVER}_{MANUAL}_{PROFILED}_{HEADLESS}
PASS
{REAL_CHROMEDRIVER}_{MANUAL}_{PROFILED}_{NON_HEADLESS}
SUCCESS
{REAL_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{HEADLESS}
PASS
{REAL_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{NON_HEADLESS}
UNEXPECTED_REGISTER_SIGNS + SUCCESS
{DEFAULT_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{HEADLESS}
BROWSER_BLOCKED
{DEFAULT_CHROMEDRIVER}_{AUTOMATION}_{PROFILED}_{NON_HEADLESS}
SLOW + SUCCESS
{DEFAULT_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{HEADLESS}
BROWSER_BLOCKED
{DEFAULT_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{NON_HEADLESS}
SPIN
{DEFAULT_CHROMEDRIVER}_{MANUAL}_{PROFILED}_{HEADLESS}
PASS
{DEFAULT_CHROMEDRIVER}_{MANUAL}_{PROFILED}_{NON_HEADLESS}
SUCCESS
{DEFAULT_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{HEADLESS}
PASS
{DEFAULT_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{NON_HEADLESS}
SUCCESS
Thoughts
1. CONNECTION_ERROR
I would not assume anything on CONNECTION_ERROR,
It could be a twitter error.
Until this happens on the second test, I would assume nothing.
2. UNEXPECTED_REGISTER_SIGNS
This happened in both
{UNDETECTED_CHROMEDRIVER}_{AUTOMATION}_{NON_PROFILED}_{NON_HEADLESS}.
{REAL_CHROMEDRIVER}_{MANUAL}_{NON_PROFILED}_{NON_HEADLESS}.
In both cases, the driver was different,
The action was different.
Thought that this might be a NON_PROFILED issue,
but in some cases NON_PROFILED was a success.
So I have no clue on this one either.
I would not be too concerned with this,
we can bypass this the first time we log in and use a cookie to be logged in all the time.
3. DEFAULT_CHROMEDRIVER
This we had some drastic effects.
Especially DEFAULT_CHROMEDRIVER with HEADLESS resulting in BROWSER_BLOCKED.
You would not be able to log, because it blocks when going into twitter.com at the first place.
This also means that twitter has a way of knowing you are going headless,
since DEFAULT_CHROMEDRIVER + NON_HEADLESS is not blocked.
This is quite funny,
As if they were protecting new programers from getting their hopes down.
Also SLOW, SPIN effects are shown.
This might be a sign that twitter is saving your data to block you afterwards.
We will know as tests go on.
PS.
If you want to have gif image logs like you see in the above,
Install ImageMagick and add the code
after the setup function.
Python:
def create_gif():
for case_dir in os.listdir(f'./log/{test_no}/'):
if case_dir == '.DS_Store':
continue
is_log_gif_present = os.path.isfile(f'./log/{test_no}/{case_dir}/log.gif')
is_log_img_present = os.path.isfile(f'./log/{test_no}/{case_dir}/0.png')
if not is_log_gif_present and is_log_img_present:
process = subprocess.Popen(
args=[rf'convert -delay 10 -loop 0 $(ls -1 *.png | sort -n) -resize 512x512 log.gif'],
cwd=f'./log/{test_no}/{case_dir}/',
shell=True
)
process.wait()
This did take me like a whole day to test,
manually change the ip,
manually register all the accounts,
remove all cookies, caches, ect when in case REAL_CHROMEDRIVER,
and the funcaptcha, the godddammm funcapcha.
Also, how do people post stuff with quality, this shit is hard.
Anyways wanted to blow off some steam off.
Next time, I will not post GIF if successful.
I will only post failures, as we can learn the most from.