-
-
Notifications
You must be signed in to change notification settings - Fork 751
-
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
--verbosemode for more details.
- Test the Settings Options
Verify the Settings options @sanity:
Can't start within block inside another within block
# paste output hereProvide 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
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
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
Beta Was this translation helpful? Give feedback.
All reactions
-
For example you have 2 elements:
<p id="p1">something!<p>and<p id="p2">something<p>
seejust checks existing text:
It will foundsomethingboth#p1and#p2.
seeTextEqualschecks one-to-one equality:
It will foundsomethingin#p2.
But#p1also has an!symbol. So its not strictly equal tosomething
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
Beta Was this translation helpful? Give feedback.