ios7-switch | ios7 style switch | iOS library
kandi X-RAY | ios7-switch Summary
kandi X-RAY | ios7-switch Summary
ios7 style switch
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ios7-switch
ios7-switch Key Features
ios7-switch Examples and Code Snippets
Community Discussions
Trending Discussions on ios7-switch
QUESTION
Below is the code that I wrote for verifying that the username and password fields present in the login page and the default text (Username in username box and Password in password box). I have also pasted the error that I am getting while executing this test. I did look around, did find a few things but nothing fits exactly in my case.
UpdateAdded the - HTML for the page as requested. I have pasted the whole but had to remove some of the HTML content due to the content limit for this.
...ANSWER
Answered 2017-Jul-03 at 06:33Instead of calling
Assert.assertTrue(driver.findElement(By.xpath(".//*[@id='LoginForm_password']")).getText().matches("Password"));
You should first store the text value of your xPath in a String variable followed by Assert.assertEquals. In your case your code block will look like
String getPasswordText = driver.findElement(By.xpath(".//*[@id='LoginForm_password']")).getText();
Assert.assertEquals(getPasswordText,"Password");
By dividing your code you would easily debug it and see whether getPasswordText has the desired expected text value or not.
Hope that helps !
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ios7-switch
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page