18 January 2026:


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.

Sahi Issue with IE8

arpitarpit Members
edited October 2011 in Sahi - Open Source
Hi Sumitra,

OS : Windows 7
Browser: IE8
Sahi: 3.5

Earlier I told you about the problem of running test cases in IE8 and you asked me to check XPath parameter , how can I check that?

When I run test cases the terminals shows following error :

error: _click(_byXPath("(//html/.//a[./@href][(((./@id = 'Entra' or contains(normalize-space(string(.)), 'Entra')) or contains(./@title, 'Entra')) or .//img[contains(./@alt, 'Entra')])] | .//*[./@role = 'link'][((./@id = 'Entra' or contains(./@value, 'Entra')) or contains(./@title, 'Entra') or contains(normalize-space(string(.)), 'Entra'))])[1]"))

Window/Domain not found: popupNameFromStep=; derivedName=; windowName=; windowTitle=XD Proxy; wasOpened=0; domain=static.ak.fbcdn.net


And IE also shows an warning popup which says :
"To help protect you security, Internet explorer has blocked this site from displaying content with security certificate errors."
When I click it and choose "Dispaly Blocked Content" , it does nothing and shows same above warning pop-up.
I don't understand how these test cases are running fine in other browsers? ..please help.

Thanks alot. You guys are doing great job.

Comments

  • Hi arpit,

    Is that you dont get the following error when you run the test cases on other browsers?

    error: _click(_byXPath("(//html/.//a[./@href][(((./@id = 'Entra' or contains(normalize-space(string(.)), 'Entra')) or contains(./@title, 'Entra')) or .//img[contains(./@alt, 'Entra')])] | .//*[./@role = 'link'][((./@id = 'Entra' or contains(./@value, 'Entra')) or contains(./@title, 'Entra') or contains(normalize-space(string(.)), 'Entra'))])[1]"))
    Window/Domain not found: popupNameFromStep=; derivedName=; windowName=; windowTitle=XD Proxy; wasOpened=0; domain=static.ak.fbcdn.net

    If so, then you need to accept the certificates for IE8.

    Kindly follow the below URL:

    http://www.youtube.com/watch?v=qfjjVUGW56s

    Check if this solves your issue.

    Regards
    Sumitra
  • Hi Sumitra,
    Sorry for my late reply, I have done as you mentioned in above reply, i have accepted all the certificates but still i am getting this error :

    ''
    When I fill in "lst-ib" with "agile media lab" # WSL\SecurityBundle\Features\Context\FeatureContext::fillField()
    error:_sahi.setServerVarPlain('___lastValue___4e9e7c0c2a32a', _byXPath("(//html/.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][(((./@id = 'lst-ib' or ./@name = 'lst-ib') or ./@id = //label[contains(normalize-space(string(.)), 'lst-ib')]/@for) or ./@placeholder = 'lst-ib')] | .//label[contains(normalize-space(string(.)), 'lst-ib')]//.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')])[1]").getAttribute("type"))
    TypeError: Object doesn't support this property or method
    No trace available
    <a href='/_s_/dyn/Log_getBrowserScript?href=null&n=-1'><b>Click for browser script</b></a>
    ''


    I was simply testing Google search, and I made a simple test case for this :

    Feature: Testing Google Search

    @javascript
    Scenario: Checking google's search
    Given I am on "http://www.google.co.in/"
    When I fill in "lst-ib" with "agile media lab" // Above Error comes on this line
    When I press "btnG"
    Then I wait for "3" second
    Then I should see "agilemedialab"

    Thanks in advance.
  • narayannarayan Administrators
    Hi arpit,

    1) Have you enabled xpaths for IE? Look at _byXPath section in http://sahi.co.in/w/browser-accessor-apis

    2) You seem to be using some BDD framework which is translating content into XPath which we try to avoid as much as possible. Xpaths are brittle and will cause you a lot of problems in maintaining your test cases.

    And some suggestions/questions for you and your management:

    3) The way you write the scenario is also incorrect because you are exposing too much implementation details in your scenario. To a business user, what is "lst-ib" and "btnG"?

    Regards,
    Narayan
  • arpitarpit Members
    edited October 2011
    Hi Sumitra,

    Thanks for the suggestion. Yes I am using BDD framework Behat Bundle & Mink Bundle, these bundle are integrated with symfony2 framework, is there any chance that sahi scripts can be integrated with symfony2 framework?
    I have read the documentation of Mink Bundle for writing test cases, so I am following the same procedure they mentioned in their Documentation. "lst-ib" is the id of input field and "btnG" is id of Button (google's search button).

    Regarding Xpaths, the test are running fine in Chrome, Firefox and Safari, no issue of Xpath. Its causing problem only with IE, ok I will try to enable xpaths.

    Update - It worked. I just replaced javascript-xpath.js with latest one.

    Thanks a lot.
This discussion has been closed.