June 6, 2023

WATIR

 WATIR - Web Application Testing Using Ruby.


For Testing the Web applications; WATIR is the best open source tool for Automation.

>> WATIR use Ruby Language for automation.
>> Best Open Source tool..
>> You can write your testcases which is easy to read and easy to develop....
>> Faster Development...
>> It easy to integrate with other tools...
>> Watir Webdriver is used...
>> Supports multiple platform and Multiple browsers...

Pre-requisite:
>> Ruby setup
>> watir webdriver gem 

Have some basic knowledge in RUBY Scripting for looping and more action

So  Automation will became a challenging task nowadays. Keep learning.

May 15, 2023

Don't do add your Widget with multiple scroll bar

 Today I tried to do a setup of my adsense account and noticed an interesting behaviour.


See the image below 



In the above image, you can view  responsive design option selection for configuring my adsense account

while adding the gadget I got an error saying, could not add a widget. I tried all the banner sizes and all throws the same error message.
I got confused on the exact error where it got failed. after multiple tried I noticed the scroll bar options in it.

While scrolling down, I got the error message saying, An Internal Error occurred, Please try again My bad

To view this error message, I need to use scroll down option in 1) browser scroll option. 2) popup scroll which is displaying in the image. 3) again inner scroll bar in the same image. 

Interesting design to use right :( 

May 8, 2023

which Answer is correct AI or Interactive

 Today I tried to find the length of a string from microsoft bing AI chat and Python interactive table.

Calculate and tell me which answer is correct.

PYTHON Interactive shell.



BING chat result.




May 7, 2023

who can answer me now

 




Modern AI technology cant answer my query. How to share this request with microsoft bing team.

// is a floor division in python. how can I get this in AI

Do you think AI will replace Human interventions. If yes, then As a tester, how can I challenge myself to the AI

1 thing I noticed like AI is also a programmaing language which will not give challenge to human brains.

February 11, 2021

XPATH Element Locator samples

 Hi Guys, 


Element locator - XPATH Plus or Minus



XPATH - XML path language > which is having nodes and it attribute elements in XML document. which we can derive values from an XML document.


XPATH which will helps people to write their automation script in easy way. 


Generally in any Selenium Testers interview question people never miss to ask this element locator.


Even me too came across this questions many times in my interview.


People Expected answer would be "We should not use XPATH"


But I felt as well as I am doing the element locators is always XPATH for UI automation.


Reason: My DEV or Design Team :) would never give the ID or specific location for all elements in a page. [common scenario will happen in most of the companies]


I felt XPATH allows me to navigate to the entire HTML structure, I can achieve anything compared to other locators.


Once I started to work with Xpath, I felt XPATH writting is difficult for me but I have lots of ways to achieve it.

XPATH is little bit easy to do.


Reason: I used lots of addons which help me to write my automation script faster. 


First I will start with addon which I used. Not only below Still lot more in market.


1) Firebug

2) Selenium IDE

3) XPATH checker

4)XPATH Finder

5) XPath tester

6) developer tool[chrome & firefox]

7) xpath helper.


BUT THIS IS NOT ENOUGH.


After these many years one of my friend suggested me the way I am doing is not perfect.


Then I started using different combination things in XPATH. 

In most of the blogs I saw only how to write the xpath. So I don't want to explain that. 


Below I am planning to give just an highlight of the XPATH possible combinations and its different conditions.


So you need to Search in google and find the real usage of the below combinations.


1) // -> any node it picks

2) //* -> caputres the entire page.

3) /* -> Travels with return full info

4) / -> Which travel on order

5) //div | //div -> or condition

6) //div and //div -> and condition

7) (//div)[1] -> first div condition of array will return.

8) (//div)[1] | (//span)[1] -> returns the combination

9) //a[@id='Jegan'] -> Same element locator with ID

10) //@id -> returns all id element

11) //a[not(@id)] - >which returns the element in anchor tag which does not contains id element.

12) //a[normalize-space(@name)='test'] -> selects the data which has name tag = 'test'

13) //*[count(@id)] -> returns the overall count in the page.

14) //*[starts-with(name(),'j')] -> returns the name tag which starts with letter 'j'

15) //*[contains(class(),'test')] -> returns the class tage which contains text 'test'

16) //*[string-length(name())=1] -> returns the string length count which is equal to 1.

17) //child::jegan  ->  which is equivalent to //jegan

18) //div/descendant::span -> returns the span element in the whole HTML file

19) //div[@id='jegan']/parent::*  -> which returns the parent of the div tag with its id as jegan.

20) //div[@id='jegan']/ancestor::* -> returns the HTML index path except the id tag.

Sibling is child within the single div element.

21) //div[@id='jegan']/following-sibling::* -> returns the next node element tag and the values

22) //div[@id='jegan']/preceding-sibling::* -> returns the previous node element. 

23) //div/following::* 

24) //div/preceding::*

25) //div/descendant-or-self::*

26) //div/ancestor-or-self::*

27) //div/ancestor::* 

28) //div/descendant::* 

29) //div/following::* 

30) //div/preceding::* 

31) //div/self::*



I felt this blog would be helpful for you as well as for me in future.