<
div
id
=
"rightContainer"
role
=
"main"
>
<
section
class
=
"application-plugin using-bootstrap"
></
section
>
<
iframe
scrolling
=
"no"
allowtransparency
=
"true"
class
=
"application-plugin-iframe"
allowfullscreen
=
"true"
style
=
"width: 100%; overflow: hidden; height: 928px;"
src
=
"http://plugins/application..."
>
#document
<!DOCTYPE html>
<
html
lang
=
"en"
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
></
head
>
<
body
>
<
div
id
=
"PluginTarget"
"></
div
>
<
div
class
=
"plugin-landing-page "
>
<
div
class
=
"plugin-landing-page-tiles clearfix "
>
::before
<
div
class
=
"col-md-4 col-sm-4 plugin-program-container "
>
<
div
class
=
"plugin-program "
></
div
>//I want to click at this element
</
div
>
<
div
class
=
"col-md-4 col-sm-4 plugin-program-container "
>...</
div
>
</
div
>
</
body
>
</
html
>
</
iframe
>
</
section
>
<
div
style
=
"display:none; "
></
div
>
</
div
>
Manager.ActiveBrowser.Frames.RefreshAllDomTrees();
Manager.ActiveBrowser.RefreshDomTree();
Manager.ActiveBrowser.Frames.WaitAllUntilReady();
int
framesNumber = Manager.ActiveBrowser.Frames.Count;
Browser topFrame = Browser.Manager.ActiveBrowser.Frames[
"application-plugin-iframe"
];
topFrame.RefreshDomTree();
topFrame is always null no matter how many times and in what sequence I’ve refreshed.
framesNumber is always null too.
2)
var topFrame = Manager.ActiveBrowser.Find.ByAttributes<HtmlControl>(
string
.Format(
"{0}={1}"
,
"class"
,
"application-plugin-iframe"
));
Predicate<HtmlControl> filter =
new
Predicate<HtmlControl>((control) => control.Attributes.Any(a => a.Name ==
"class="
&& a.Value==
"plugin-program"
));
var myBox =topFrame.Find.ByCustom<HtmlControl>(filter);
Using this approach I’m able to get the iFrame as HtmlControl or HtmlContainerControl element but myBox element is always null.
3)
var iFrame1 = Browser.Find.ByExpression(
"tagname=iframe"
);
var iFrameHtmlControl =
new
HtmlControl (iFrame1);
IUiSearchable searchable =
new
SearchableUiContext<HtmlControl>(iFrameHtmlControl);
searchable.Refresh();
HtmlControl result = searchable.Find.ByAttributes<HtmlControl>(
string
.Format(
"{0}={1}"
,
"class"
,
"plugin-program"
));
var topFrame = Manager.ActiveBrowser.Find.ByAttributes<HtmlControl>(
string
.Format(
"{0}={1}"
,
"class"
,
"application-plugin-iframe"
));
allSubElements.AddRange(start.ChildNodes);
5)
Manager.ActiveBrowser.Actions.InvokeScript(
"$('body /deep/ #PluginTarget .plugin-program.click();"
);
This script worked when executed in Chrome Browser console but I need to click inside the Shadow DOM before. I still can’t do that from the test so executing JavaScript to click the desired element also failed.
As you can see I'm running out of ideas for this issue which is quite frustrating. Since the main logic of my app reside in that iFrame not being able to operate with it is a true deal breaker for me.
Thank you in advance for any help.
Kind regards,
I am facing an issue with Htmlspan clicking over a Menu Item. The issue is if I am using the below code (for example) it is working fine
HtmlSpan menu = manager.ActiveBrowser.Find.ByExpression<HtmlSpan>("tagname=span", "TextContent=~Management Process");
menu.Click(false);
But, when I am using this code it is not working
HtmlSpan menu = manager.ActiveBrowser.Find.ByExpression<HtmlSpan>("tagname=span", "TextContent=Management Process Dynamic");
menu.Click(false);
I am not able to understand why the exact TextContext is not working, I can't rely on the partial one, because multiple menu items can start with the same name (not now but may be in future). Please let me know if I need to change the Find Expression or I am missing something.
Regards,
Arvind Dhiman
Hi,
In my project I have two tests, one for 'Accounts' and another for 'Advanced Find'
The 'Accounts' test has a coded step..
public void SelectAccountTypeByName(String typeName, Browser xframe)
{
I would like to test a grid (ASP.NET) with batch editing by using testing framework. To trigger the batch editing function, a user activate this with the mouse up event. If I use MouseClick(MouseLeftClick) or MouseClick(MouseLeftUp), the editing was not activated. Thank you for your help.
I'd like to run my tests on a different server. Therefore I copied my project .exe along with all the .dll files to my server and started to run it.
Seeing as Firefox doesn't have the Telerik Test Studio Automation extension installed on my server the test just hang.
Therefore I'd like to install the extension, however where exactly does one download the extension? It doesn't seem to be available in the Firefox addon store nor any place else.
So my question is, from where do I download the Telerik Test Studio Automation extension for Firefox?
Hello,
I have an automation suite that takes a long time to fully run. It mainly consists of test-cases that take 30s-4m on average, but all add up to 2.5 hours total. As I run the automation, I notice that parsing text from pages seems to get slower and slower and then at some point telerik can't access pages anymore and all InternetExplorer shows is this error:
"PRXY0007: The request or the response message was incomplete or malformed. An existing connection was forcibly closed by the remote host"
Is there a known reason why this would happen? How is it prevented?
The code that is below is something that I quite frequently have to use in order to export data from my application and handle the overwrite box if it pops up. My issue is, I have to copy and paste this in every single new test that I do and make sure I change all the right values. What I would like to do is put this in a 'library' file so I can just access a single function call in each test that will handle all of this, instead of copying and changing ALL of this text every single time. This is in an attempt to make my project a little smaller, and make it easier to maintain and create.
However. The manager class, and call to the element to open the dialog handler are getting in my way to moving this into a separate class file. Does anybody know of a way I might be able to accomplish this?
GenericDialog genDialog = new GenericDialog(Manager.ActiveApplication, "Save As", false, 6);
SaveAsDialog saveDlg = SaveAsDialog.CreateSaveAsDialog(Manager.ActiveApplication, DialogButton.SAVE, queryFilePath);
Manager.DialogMonitor.AddDialog(saveDlg);
Manager.DialogMonitor.AddDialog(genDialog);
Manager.DialogMonitor.Start();
// Wait for '1000' msec.
// Handle the overwrite box on save.
Applications.dTIMSexe.dTIMS_V9_For_Windows.ExportAllTextblock.User.Click(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 23, 19, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));
saveDlg.WaitUntilHandled(60000);
Manager.DialogMonitor.Stop();
Manager.DialogMonitor.RemoveDialogs(saveDlg, genDialog);
Hello! Quick question regarding how data driven test structure works.
Let's pretend I have test A which logs into a website. Test B will now now use test A using 'test as a step' to get to the webpage and do additional things on the page.
Now let's say I want to want to use different accounts for test A to log into the website so test A is now data driven. However, the content on the website changes for each different account so if I turn test B data driven as well, I need to verify certain elements that correspond to the account that was used to log in.
If I follow this workflow however, and use data driven test A as a 'test step' inside test B, test A will run through all of it's data driven iterations before running anything in test B.
I want each the data for test A and B to be executed in tandem so the flow becomes:
log into account 1, verify on the website data belonging to account 1
log into account 2, verify on the website data belonging to account 1
How it currently works however, given my test flow, is:
log into account 1
log into account 2
verify on the website data belonging to account 1,
verify on the website data belonging to account 1
..which is not what I want. The only alternative I can think of is not using 'test as a step' to bypass the way the data driven logic is currently behaving. If there is any other way to switch up the order of how data driven tests work, please let me know, thanks!