18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
menu bar - test pass after change is made
My question:
I am trying to detect the difference in context on the same website.
example: go to www.google.com
the menu bar, click "More" to see the drop down menu.
My test1 will detect all the context in that drop down menu.
In this case, it will detect the following:
Translate
Mobile
Books
Offers
Wallet
Shopping
Blogger
Finance
Photos
Videos
Even More
An edit as been made to the exact same site and added a new option "ExampleTab1" after "Even More"
New list is as follow:
Translate
Mobile
Books
Offers
Wallet
Shopping
Blogger
Finance
Photos
Videos
Even More
ExampleTab1
Although the site is different now, the test1 will still pass. What can I do to the test to make it fail because there is
change to the website?
I am trying to detect the difference in context on the same website.
example: go to www.google.com
the menu bar, click "More" to see the drop down menu.
My test1 will detect all the context in that drop down menu.
In this case, it will detect the following:
Translate
Mobile
Books
Offers
Wallet
Shopping
Blogger
Finance
Photos
Videos
Even More
An edit as been made to the exact same site and added a new option "ExampleTab1" after "Even More"
New list is as follow:
Translate
Mobile
Books
Offers
Wallet
Shopping
Blogger
Finance
Photos
Videos
Even More
ExampleTab1
Although the site is different now, the test1 will still pass. What can I do to the test to make it fail because there is
change to the website?
Best Answer
-
Hi hover77,
You can use the following code to check for change in your dropdown box:_select("your_select_box").length;
So in the first case, the value of the above piece of code will be 11 and after the addition, it will be 12.
So you can check for the value to be 11 and it will fail.
Regards.
Answers