Monday, July 27, 2026

How to interact with the non-interactable Web Elements in Selenium



How to interact with the non-interact able Web Elements in Selenium 


 // Find the non-interactable element

element WebElement element = driver.findElement(By.id("hidden-or-covered-button"));

// 2. Cast the driver to JavascriptExecutor JavascriptExecutor js = (JavascriptExecutor) driver;


// 3. Execute the native JS click method on the element js.executeScript("arguments[0].click();", element);

Saturday, March 14, 2026

jq command in Linux

 How to access the {"field-name":"cskmetro"}


echo "{\"field-name\":\"cskmetro\"}" |jq -r '."field-name"'


will give the field value

cskmetro

Tuesday, July 23, 2024

Linux Kernel Compilation

 Step 1: Install Required Packages

Install additional packages before building a kernel. To do so, run this command:

sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison


Step 2:

Download the Kernel source code from kernel.org, Extract the tar file

Install linux-headers for the base kernel version use following command to know the base kernel version 'uname -a'


Step3 :


Goto the Extracted directory/folder

run following command

make menuconfig


then save the configurationg and click exit


Step 4 :


Run the following command for compiling kernel

make

Step 5 :

Install kernel modules and kernel

make modules_install
make install

 

Step 6:

 

If amd based CPU in the machine

  sudo apt-get install firmware-amd-graphics

Wednesday, April 12, 2023

JMeter JSON Extractor

 

 

 

json response

{"Key1":"Value1","Key2":"Value2","Key2":"Value2"} 



Name of the variables : jtoken

JSON path Expressions : $.Key1

Thursday, March 30, 2023

BOSS AMD 64 Graphics Driver Installation

 

1.Connect the BOSS repository

 

2.Then issue following commands

 

sudo apt-get install firmware-amd-graphics


3.Restart the Machine.

Wednesday, January 4, 2023

Virtual Manager (virt-manager) Installation BOSS Linux

 

 

Step 1:

 

Open the terminal

 

Step 2:

 

Kindly issue the command on the terminal given below

sudo apt-get install qemu-kvm virt-manager qemu-system libvirt0 bridge-utils

Tuesday, December 27, 2022

Jupyter installation

 

Step 1:

upgrade the pip3

apt-get install python3-pip

sudo pip3 install --upgrade pip 
 
Step 2:
 
Create virtual environment
 
sudo pip3 install virtualenv
 
pip3 install virtualenv
 
mkdir demo
cd demo
virtualenv mynotebookenv
source mynotebookenv/bin/activate 
 
Step 3:
install the jupyter 
pip install jupyter
jupyter notebook

Friday, November 25, 2022

JMeter Heap Size increase

 

Open the jmeter.bat  file and then add following


HEAP=-Xms1g -Xmx1g


Change to 12GB following like this


HEAP=-Xms12g -Xmx12g

Sunday, November 20, 2022

JAVA Path and JAVA_HOME Path Setting in Linux

 


  1. Open the Terminal

  2. Prepend sudo if logged in as not-privileged user, ie. sudo nano

  3. nano /etc/profile

  4. Press 'i' to get in insert mode
  5. add following :

    export JAVA_HOME="path that you found"
    
    export PATH=$JAVA_HOME/bin:$PATH
    
  6. logout and login again, reboot, or use source /etc/profile to apply changes immediately in your current shell

Monday, October 17, 2022

Running Simple Web Server on Python 2 and Python 3

 



Running Simple Web Server on Python 2


python -m SimpleHTTPServer 8000



Running Simple Web Server on Python 3


python -m http.server 8000

Friday, September 23, 2022

Getting Wazuh Agent key from Wazuh Server

 TOKEN=$(curl -u "<username>:<password>" -k -X GET "https://<hostname or ip address>:<port number>/security/user/authenticate?raw=true")



curl -k -X POST -d '{"name":"<agentname>"}' "https://<hostname or ip address>:<port number>/agents?pretty=true" -H "Content-Type:application/json" -H "Authorization: Bearer $TOKEN"

Wednesday, September 21, 2022

Kibana: NoShardsAvailable Error Solved

 Most likely your Kibana shards are not allocated. 

You can check if some or all of your shards are UNASSIGNED using curl -XGET <host>:9200/_cat/shards?v.


In Dev Tools in Kibana:

GET /_cat/shards?v


I have deleted the UNASSIGNED Status index from Kibana Now the Error is resolved


Monday, July 4, 2022

Log rotate error :error: skipping "log file name or path of the file" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

 Error Description:

error: skipping "<log file name>" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.


Answer

su <user> <group>

Thursday, March 3, 2022

Selection of Specific Characters from Given Text or Word

 

To select the "XX" characters 

issue the following command

 

echo "C2312GGG999XXL0021"|cut -c 12-13`

Thursday, February 24, 2022

Friday, December 24, 2021

HP Color LaserJet PRO MFP M176n Network Scanning Steps

 HP Color LaserJet PRO MFP M176n

Step 1

Use the “simple scan” Application for Scanning


Check the scanner is detected through Simple Scan -> Document -> Preferences -> Select the default scanners 



Step 2:

Step 1 Not working try this step 

HP Color LaserJet PRO MFP M176n Network Scanning :


  1. Go to the printer and determine the IP address of printer e.g.  10.x.x.156

  2. Key the printer's IP address into chromium web browser

  3. Go to Scan, there should be a Webscan option. If it says "You cannot use this function....", you'll need to enable it.

  4. Enabling Webscan : Click on "Settings"> "Security">"Administrator Settings" (just "Continue" if there are any warnings regarding Certificates, you may need to click on "Advanced" to continue)

  5. Under "Administrator Settings", there should be a "Webscan" option, make sure that is "Checked" and "Apply" or "Save" your settings.

  6. Go back to Scan and you should be able to see the options to Scan. Select "Document Source" to be "ADF", "Document Type" to be PDF and "Start Scan"! (You can also select “Document Source” to be “JPEG”)

  7. Once scanning is done, Right-click and save your file to the desired destination.



To know the list of scanners connected in your machine

scanimage -L

sane-find-scanner

hp-scan

Thursday, December 23, 2021

EPSON-L3150 and EPSON-L6190 Driver installation

 Step 1:


Connect to BOSS Repository update it


sudo apt-get update 


Step 2:


Download the following package


http://ftp.us.debian.org/debian/pool/main/l/lsb/lsb-compat_9.20161125_amd64.deb


Step 3:


Install following packages


sudo apt-get install lib32z1 libc6-i386


Step 4:


Install the package downloaded in step 2 sb-compat_9.20161125_amd64.deb


sudo  dpkg -i sb-compat_9.20161125_amd64.deb


Step 5:


EPSON-L3150  Driver installation


http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=IN&CTI=4&PRN=L1110%20Series&OSC=LX

Download the epson-inkjet-printer-escpr_1.7.17-1lsb3.2_amd64.deb from above link and install


sudo apt-get install epson-inkjet-printer-escpr_1.7.17-1lsb3.2_amd64.deb


Step 6:


EPSON-L6190 Driver installation


http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=SG&CTI=4&PRN=L6190%20Series&OSC=LX


Download the epson-inkjet-printer-escpr2_1.1.45-1lsb3.2_amd64.deb from above link and install


sudo apt-get install epson-inkjet-printer-escpr2_1.1.45-1lsb3.2_amd64.deb


Monday, July 5, 2021

How to Specify Directory for Windows in Python Program

 

you can use always:

'C:/mydir'

this works both in linux and windows. Other posibility is

'C:\\mydir'

if you have problems with some names you can also try raw string literals:

r'C:\mydir'

however best practice is to use the os.path module functions that always select the correct configuration for your OS:

os.path.join(mydir, myfile)

Thursday, April 15, 2021

Root Terminal Enabling in Linux

 

1.Open the /etc/passwd file

 change the following line 


root:x:0:0:root:/root:/usr/sbin/nologin

to

root:x:0:0:root:/root:/bin/bash



2.Issue the following command in terminal


chmodg+rx /usr/bin/gnome-terminal


Monday, December 14, 2020

Resizing VDI Image

Note: once the image resized it should not able reduce it

 

 

 

Convert VDI to QCOW2 image

  sudo qemu-img convert -O qcow2 example.vdi example1.qcow2 -p

Resize the image

 qemu-img resize siemmaster.qcow2 +10G

Boot the Image

do the resize the image

resize2fs /dev/sda1

Check the disk space of the image

df -h
 

 

Convert qcow2 image ti VDI

 sudo qemu-img convert -O vdi example1.qcow2 example_converted.vdi -p

How to interact with the non-interactable Web Elements in Selenium

How to interact with the non-interact able Web Elements in Selenium    // Find the non-interactable element element WebElement element = dr...