Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

What is the difference between I.see & I.seeTextEqual #3019

Unanswered
sumiagar asked this question in Q&A
Discussion options

I want to verify the Text and browse the screen

1) Test the Settings Options

 Verify the Settings options @sanity:
 Can't start within block inside another within block

Provide console output if related. Use --verbose mode for more details.

  1. Test the Settings Options
    Verify the Settings options @sanity:
    Can't start within block inside another within block
# paste output here

Provide test source code if related

Scenario('Verify the Settings options @sanity', (I,settings) => {
 
 I.navigateTo('settings');
 settings.verify_the_Settings_options();
});
verify_the_Settings_options: function() {
 within({frame: "#SETTINGS"}, () => {
 for(let i =0; i<settings_submenu.length; i++)
 {
 console.log(settings_submenu[i])
 //I.see(settings_submenu[i])
 I.seeTextEquals(settings_submenu[i],'//*[@id="settingsMenu"]/li[i+1]/p');
 // I.seeElement('//*[@id="settingsMenu"]/li[i+1]/img[i+1]')
 I.pressKey(key.DOWN)
 }
 });
},

With I. See test is executing normal . and pass
When I use I.seeText Equal in that case failing and saying can't use blaock inside a block

Details

  • CodeceptJS version:
  • NodeJS Version:
  • Operating System:
  • Protractor || WebDriverIO || Nightmare version (if related)
  • Configuration file:
# paste suite config here
You must be logged in to vote

Replies: 2 comments

Comment options

For example you have 2 elements:
<p id="p1">something!<p> and <p id="p2">something<p>

see just checks existing text:
It will found something both #p1 and #p2.

seeTextEquals checks one-to-one equality:
It will found something in #p2.
But #p1 also has an ! symbol. So its not strictly equal to something

You must be logged in to vote
0 replies
Comment options

For example you have 2 elements:
<p id="p1">something!<p> and <p id="p2">something<p>

see just checks existing text:
It will found something both #p1 and #p2.

seeTextEquals checks one-to-one equality:
It will found something in #p2.
But #p1 also has an ! symbol. So its not strictly equal to something

Thanks for the reply . Diff I understand .
BUt how can I fix my error .
Why it is througing the block error into Within block.
If I removed the withIN then it wouldn't able to find xpath

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Converted from issue

This discussion was converted from issue #1833 on September 05, 2021 17:26.

AltStyle によって変換されたページ (->オリジナル) /