How to Validate the XPATH is correct in Selenium automation
How to validate XPath?
In console type $x(“paste xpath here”) and enter. Result should show the correct element pointing to the xpath.For css, try with $(“paste css here”)
Customized XPath
From html code, we can create XPath and validate.
\\tagName[@attribute=‘value]
Css can created using below formula from html code.
tagName[attribute=‘value’]
Mouse interactions- Actions Class
create an object and use moveToElement and build().perform() method
What is PyTorch
PyTorch is Python based scientific library meant to provide a deep learning platform and also to replace NumPy.
PyTorch is developed by Facebook.
PyTorch is leveraged by researchers , AI developers and students.
PyTorch offers an easy to Use interface for APIs and also easily integrates with python data science stack.
PyTorch also provides dynamic computational graphs.
Now How to Install PyTorch:
Step 1. Install Anaconda
Step 2. Open Anaconda Command Prompt
Step 3. conda install pytorch -c pytorch
Step 4. Pip install torchvision and add environment to ipykernel
A back pain story … :)
Ever since I got a full blown back pain in late 2018, I learned on how to differentiate ‘real back pain’ vs ‘regular back pain’ 🙂
Chiropractic treatment started since then; the expensive hourly Chiropractic sessions started with a theory behind back pain, a much boring one and I was counting every minute waiting for an actual treatment). As per Chiro guy, my muscle systems are tired as it is constantly working to re-align the bone since brain had sensed a misalignment in the hip area :P. That theory proved wrong miserably when I did a low cost $65 MRI while at India during my much awaited vacation in 2019, one can not get a doctor visit for this amount in United States !!!. Almost one year 2018-19 period , I was following Chiropractor’s direction and theory… with tired ‘muscle and brain’ 🙂
Total cost for one year sessions and medications to reboot my tired muscles (as per Chiro theory) = $1200.
India Trip: First half of the India trip was meant for H1Visa stamping Agenda and second half turned out to be an Ayurveda treatment session. Ayurveda team started telling new theory that your back had developed swelling of disc causing muscle pains. I am ready to buy this theory as I noticed back pain triggered right after a much ‘needed’ “Flu Shot” for Winter season. The verdict is 3 weeks traction and oil massage (using heated ‘kizhi’) – refer amazon they know what is kizhi and kizhi products 🙂
My second half of trip has got only 1 week allocated time and could not complete treatment. Came back to US with partial treatment and medications weighing almost 2 pounds. I was advised to finish these medications in a month 🙂
My Findings ! : Finally a good thing happened, I noticed an ad on internet. Thanks to Google and Facebook who is using their AI skills and were peeping at my internet search history !! The product is amazing and reduced my back pain in 2-3 days to no-pain !!!
Amazon link : https://www.amazon.com/dp/B06ZZWZL2F/ref=cm_sw_r_wa_apa_i_hV6hEbYYGYGA8
Then I understood the right path that I need to follow and second product came to my home from Amazon. Second product removed the cause of pain while the first one got rid off the pain itself !
Amazon link : https://www.amazon.com/gp/aw/d/B07ZRJZXF7?psc=1&ref=ppx_pop_mob_b_asin_image
PS: As you know when you watch a horror movie, they end with a hint on next series. I never know when a “Back pain story returns…:)”
Disclaimer : This is based on my experience and not a medical advice. You should always seek the advice of your physician or any other qualified health provider with any questions or concerns you may have regarding your health.
How to test Latency in Microsoft windows operatin system using PowerShell cmndlets
Eventhough utility like LatencyMon is useful to test Winodws latency, PowerShell provides a cmndlets “Get-Counter” (example copied below). This cmndlets can run for an interval of time or continuously.
E.g for short interval run:
Get-Counter -Counter “\Processor(_Total)\% Processor Time” -SampleInterval 5 -MaxSamples 2
Sample interval 5 means every 5 sec counter checks it and Maxsamples 2 means 2 results are generated.
E.g. for continuous run:
Get-Counter -Counter “\Processor(_Total)\% Processor Time” -Continuous
How to test the latency issues in Microsoft windows version upgrades
Latency issues generally occurs as a side effects of patch updates in windows. It may occur as audio/video streaming performance issues.
Latency issues can be tested using LatencyMon or Thesycon
Note : Thesycon is more effective on lower versions on windows like 7 or lower.
What is BMC BladeLogic
BaldeLogic is a server automation suite.
An admin needs to manage sever configuration, patching, compliance, change control, change management, provisioning etc.
BaldeLogic does this automation when several server needs this activities to be done.
In order to Bladelogic infrastructure has BSA centralized interface using that admin sets configuration, deploy, etc for any number of servers.
All servers needs an agent to be installed. BSA uses port 4750 to call all the agents and achieve this requirement.
What is REST client in Visual studio code
REST client is an extension available in Visual Studio code available through its market place.
REST client make API test automation easy via Visual studio code development.
Consider a scenario where you needed to handshake selenium UI automation with API REST calls, normally you would need to do coding effort for REST calls. In this case REST client makes life easy.
Please find below example on REST client coding:
GET transaction for getting a response
# codes starts here
GET https://endpointurl/xxxxx
Authorization: {{“token”}}
# code ends..
Note : you can pass token as variable as well.
Similarly POST, or PUT works and needs the json input file/string to be attached with POST, PUT request
What is Automagica
Automagica is Smart robotic process automation (SRPA) tool and best matches for Windows automation. Aytomagica is built on the following open source libraries,
PyPDF2
Psutil
py-trello
plyer
Pillow
Faker
Psutil
Keyring
PySimpleGUI
Cryptography
PyAutoGUI
Selenium
PyWinAuto
OpenPyXL
python-docx
pywin32
pyttsx3
pyad
jupyterlab
SRPA Automagica automates windows paint, excel, sap apps etc.
What is Apache Kafka
Apache Kafka, distributed streaming platform was originally developed by LinkedIn and used for data streaming. It is now open source platform under Apache software foundation. Programming language used for Kafka development are Java and Scala.
Kafka Architecture has producers send Key-Value messages to Kafka clusters. Data can be partitioned into different partitions under kafka topics. Kafka consumers read data from partitions.
Binary TCP based Protocol is used in Kafka.