Hi all,
I'm trying to close some slide outs and in page pop ups when they show (they only show after cookies are cleared when you first visit this page)
I've tried a few things but i'm not getting the results i need. Examples i've found use .isVisible which i couldnt find in my available options.<div class="popup-modal most-visible" style="display: block; z-index: 102; width: auto; height: auto; top: 159px; left: 680px;">
Here are the 2 snippets of code i want to verify if they are "showing on the page currently"
I'm trying to close some slide outs and in page pop ups when they show (they only show after cookies are cleared when you first visit this page)
I've tried a few things but i'm not getting the results i need. Examples i've found use .isVisible which i couldnt find in my available options.<div class="popup-modal most-visible" style="display: block; z-index: 102; width: auto; height: auto; top: 159px; left: 680px;">
Here are the 2 snippets of code i want to verify if they are "showing on the page currently"
<
div
class
=
"popup-modal most-visible"
style
=
"display: block; z-index: 102; width: auto; height: auto; top: 159px; left: 680px;"
>
<
div
class
=
"qsc-popup-dialog"
style
=
"display: block; visibility: visible;"
>
<
div
class
=
"close-button"
title
=
"Close Dialog"
></
div
>
<
div
class
=
"header"
>Product Type</
div
>
<
div
id
=
"startupHelp"
class
=
"body"
style
=
"width: auto; height: auto; overflow: auto;"
>
<
div
class
=
"footer"
>
</
div
>
</
div
>
<
div
class
=
"sf-pagehelp"
style
=
"left: 0px;"
>
<
a
class
=
"sf-pagehelp-pin"
href
=
"#"
style
=
"display: none;"
></
a
>
<
div
class
=
"sf-pagehelp-hdr"
>
<
h3
>Page Help</
h3
>
<
div
class
=
"sf-pagehelp-subtext"
>Quick answers for the current page.</
div
>
</
div
>
<
div
class
=
"sf-pagehelp-wrap"
>
<
div
class
=
"sf-pagehelp-toggle"
></
div
>
</
div
>
I think i'm having issues because the code will always be in the source so what i'm trying now will never be false...
browser.RefreshDomTree();
//if help is open close it.
if
(browser.Find.ById(
"sf-pagehelp"
) !=
null
)
{
browser.Actions.Click(browser.Find.ById(
"sf-pagehelp-toggle"
));
}
else
if
(browser.Find.ByXPath(
"/html/body/div[3]/div/div[4]/div/span/a/span/span/input"
) !=
null
)
{
browser.Actions.Click(browser.Find.ByXPath(
"/html/body/div[3]/div/div[4]/div/span/a/span/span/input"
));
}
any help is appreciated.
thanks!