0

When i am executing a jasmine script using protractor, i am getting below message but test step is having lot of elements and i'm not sure which element is not visible, is there any way to capture the non visisble element in console output.

× should able to change first and last name of the existing 'Admin User'

  • Failed: element not visible

do i need to do any changes in config file?

my current config is below.

/** * Created by KumarSo on 5/25/2016.

*/

exports.config = {
    directConnect: true,
    seleniumAddress: 'http://localhost:4444/wd/hub',
    specs: ['../conf/costome_conf.js','../test_spec/EditUserTest_spec.js'],
    chromeDriver: C:/Users/KumarSo/AppData/Roaming/npm/node_modules/chromedriver/lib/chromedriver/chromedriver.exe',
    framework: 'jasmine2',
    multiCapabilities: [{
        browserName: 'chrome'
    }],
    allScriptsTimeout: 100000,
    jasmineNodeOpts: {
        onComplete: null,
        isVerbose: false,
        showColors: true,
        includeStackTrace: true,
        defaultTimeoutInterval: 100000,
        print: function () {
        }
    },
    onPrepare: function () {
        var SpecReporter = require('jasmine-spec-reporter');
        // add jasmine spec reporter
        jasmine.getEnv().addReporter(new SpecReporter({
            displayStacktrace: true,
            displayFailuresSummary: true,
        }));
        browser.driver.manage().window().maximize();
   },
};
SomeshKumar N
  • 91
  • 2
  • 9
  • Isn't that error only during run time? You're using spec-reporter with `displayStacktrace: true`, so after the suite runs you should have a more detailed error log which includes the line of code that is failing. – Gunderson Jun 29 '16 at 11:53
  • so you mean, i should remove the displayStackTrace??? – SomeshKumar N Jun 29 '16 at 11:55
  • check out this thread, it might help -http://stackoverflow.com/questions/37809915/element-not-visible-error-not-able-to-click-an-element – Ram Pasala Jun 29 '16 at 11:59
  • No do not remove the stack trace.... you need it and already have it. So when a test fails wait for that spec to finish and you should see something like `Stack: Error: Failed expectatation at Object */tests/suites/test.spec.js: 156:28*`. That line of code is your failing element. – Gunderson Jun 29 '16 at 11:59
  • no i am not getting anything like that, i'm expecting like Failed: element not visible by.id('visibleElementId') – SomeshKumar N Jun 29 '16 at 12:02

0 Answers0