Giter VIP home page Giter VIP logo

fluentautomation's People

Contributors

gaggle avatar halex2005 avatar henrikrossen avatar jornh avatar mattlud avatar mike737377 avatar pauljz avatar scmccart avatar sebazzz avatar stirno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluentautomation's Issues

I.Expect.Text returns invalid error message

I.Expect.Text("Add").In("User.AddButton") - returns 'Value assertion failed. Expected element [input[Value='Add']] to have a value of [Add] but actual value is [string.Empty]

Error message should be input[Text='Add']

I.Expect.Alert()

Not working properly in Selenium using Firefox or Chrome drivers. Tracking so I can tackle this later.

System.NullReferenceException: Object reference not set to an instance of an object.
at FluentAutomation.SeleniumWebDriver.AutomationProvider.HandleAlertDialog(String expectedMessage)
at FluentAutomation.API.ExpectManager.Alert(String alertMessage)

Test should not be tied to specific browser

I.Use(BrowserType.InternetExplorer);

What if I want to run the same test against different browsers?

I.Use may not be necessary assuming this won't support opening multiple browser sessions during a single test then the browser can be opened automatically on the first call to I.Action

_browser can be referenced from a property and if null can open a new session

Options to set browser can be in config or I.Set.Browser(BrowserType.InternetExplorer)

I.Expect.Count(2).Of(something) fails

If I expect count of 2 then I get an error 'Count assertion failed. Expected there to be [2] elements matching [somevalue]].Actual count is [1].

Count seems to be zero based and shouldn't be

"No automation provider available"

Trying to get this working with Xunit + Selenium WebDriver + Resharper Test Runner

All I get back is System.InvalidOperationException: No automation provider available.

I have the relevant Nuget packages installed:

Is something not copying correctly when the test runner runs?

No access to AutomationProvider.Authenticate() through FluentTest

Apparently there's some authentication logic within the AutomationProvider, but it's not clear how to expose that to a test.

Is this a case where I just create my own AutomationProvider/CommandManager and or what are your intentions with that basic auth logic?

(might not be a bug)

Clarify asserts

Add css selector used on an assert. Also place values in the assert in [] to separate the selector or text element used from the assert error sentance.

Return text of a css selector

If a have a css selector such as: " .node a:eq({0})", I need to be able to pass in the index and have it return the text value of that css selector

Automatically open browser on first action

Related to Issue #9 but limited to removing the functionality of I.Use to open the browser and instead setting the desired browser if different the default. This would open the browser on the first action and not on I.Use. Ability to change default browser in config file is separate issue

Expect on element not comparing to correct actual value.

FluentAutomation.API.AssertException: Value assertion failed. Expected element [div.error] to have a value of [User name or password is incorrect.] but actual value is [string.Empty].

Confirmed in jquery that when running:
$("div.error")
I get 1 result:
<div class="error">User name or password is incorrect.</div>

Ability to validate no duplicates are in a list

We have a select list and a list of items can be added to it. If an item is already there it should not be added to the list. We need a way to validate that a list does not have duplicates or specify that a specific item is not duplicated.

I.Expect.AnyValue("value1", "value2", ...).In()

If a selector contains multiple elements the text content of each is mashed together for an I.Expect.Value. Improve on this by allowing a list of values to compare to the content of a group of elements.

Add a property to access the current WebDriver

Great project - would it be possible to add a property to access your current WebDriver, i.e. FirefoxDriver. I'm not sure how it would with I, something like

I.GetDriver().FindElement(By.Name("q"))

I need this as sometimes Sizzle break with jQuery, or doesn't give us the ability to do a text search of the innerHtml.

I.Expect.Class()

string.Format error when class is not found on element in Selenium using Chrome. Haven't tested in other browsers/WatiN.

URL assertion failed

I.Expect.Url(Config.LoginPage);

public static string LoginPage
{
get
{
return string.Format("http://{1}/Account/LogOn?returnUrl=http%3a%2f%2f{0}.{1}%3a80", Customer, Site);
}
}

worked previously but now getting:
URL Assertion failed. Expected URL
http://domain.tld/Account/LogOn?returnUrl=http%3a%2f%2fcustomer.domain.tld%3a80 but actual URL is
http://domain.tld/Account/LogOn?returnUrl=http://customer.domain.tld:80.

because the window is now maximized, I can't visually verify the url

Click that triggers page load doesn't wait

Doing and I.Expect.Url right after I.Click that triggers a page load fails due to race condition. I.Expect.Url can trigger before the page has loaded and therefore compares against the previous page.

Assert failed on select options

In firebug, this works: $(".wizard select.It:eq(0)");

When using: $(".wizard select.It:eq(0)"); this error occurs:
SelectElement value assertion failed. Expected element [.wizard select.It :eq(0)] to have a selected value of [Select...] but actual selected value is [string.Empty].

I am now able to get it to work with [.wizard select.It :eq(0) option:selected]

OnChange causes an UnexpectedJavascriptError in IE9

In the SeleniumWebDriver.Element.OnChange method (line 121) has problems with IE, including IE9:

    public virtual void OnChange()
    {
        ((IJavaScriptExecutor)_driver).ExecuteScript(string.Format("if (typeof jQuery != 'undefined') {{ jQuery(\"{0}\").click(); }}", _fieldSelector.Replace("\"", "")));
    }

The answer appears to be to use click(), from this discussion: http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie

Or if you're using jQuery 1.5 the problem is resolved but unfortunately we're using jQuery 1.3.

Once I setup Github I'll try to push a patch

I.Expect.Index is needed

If a row is entered on an UI, and the css selector is same for all items on the UI except for the :eq index number, I need to be able to get the index number of the customer identified by a title value.

For example, the UI consists of a sorted grid with two columns. In the first column it lists the customer in alpha order. The next column is a delete buttons which correspond to the customer that the row it is on.

Customer | Action |Index |
Dick's Bar and Grill | Delete |0 |
Don's Kwik Shop | Delete |1 |
Joe's Bait Store | Delete |2 |
The Gas Station | Delete |3 |

Now, if I add "Apple Pie Restaurant" to this, then all the indexes are going to change. If I want to click the Delete button for Joe's Bait Store, I need to be able to get the index for Joe's Bait Store, so I can click the correct Delete button.

Send Keys

Need the ability to sendkeys - tried to use:

System.Windows.Forms.SendKeys.SendWait("TAB");

but no luck

I.WaitUntil can fail when page takes too long to load

When using the WaitUntil functionality with Selenium I kept running into issues where the automation was trying to run before the page was fully loaded.
This was causing JS errors.

My current work around look like is:
public void WaitUntil(Expression conditionAction, TimeSpan timeout)
{
this.Act(() =>
{
DateTime dateTimeTimeout = DateTime.Now.Add(timeout);
string source = this.webDriver.PageSource;

            while (DateTime.Now < dateTimeTimeout)
            {
                System.Threading.Thread.Sleep(Settings.DefaultWaitUntilThreadSleep);

                if (source.Equals(this.webDriver.PageSource))
                {
                    break;
                }
                else
                {
                    source = this.webDriver.PageSource;
                }
            }

            bool threwException = false;
            var compiledAction = conditionAction.Compile();

            FluentException lastFluentException = null;

            do
            {
                try
                {
                    threwException = false;
                    compiledAction();
                }
                catch (FluentException ex)
                {
                    threwException = true;
                    lastFluentException = ex;
                }
                catch (Exception ex)
                {
                    throw new FluentException("An unexpected exception was thrown inside WaitUntil(Action). See InnerException for details.\r\n{0}", ex, source);
                }

                if (!threwException)
                {
                    break;
                }

                System.Threading.Thread.Sleep(Settings.DefaultWaitUntilThreadSleep);
            }
            while (DateTime.Now < dateTimeTimeout);

            // If an exception was thrown the last loop, assume we hit the timeout
            if (threwException == true)
            {
                throw new FluentException("Conditional wait passed the timeout [{0}ms]. See InnerException for details of the last FluentException thrown.\r\n{1}", lastFluentException, timeout.TotalMilliseconds, source);
            }
        });
    }

Issue clicking item in list that closes when the list loses focus

We have a textbox for search. When you type in the textbox a list is displayed below it. This list closes when you lose focus. When trying to click on an item in the list I can see watin highlight the item that it clicked on but nothing seems to happen. This works repeating the steps manually. It seems that Fluent/Watin is causing some additional interaction from what a user would do that is causing this list to lose focus and close.

iframe handling

Need ability to switch document in case of iframes in page. Or have a way of having access to the driver and do it classic way ie

driver.SwitchTo().Frame(someFrame).

Maybe this can be achieved in another way already , but I couldn't find it.

Thanks for your help

Selenium provider Focus

While looking into another reported issue, noticed that the Selenium providers Focus implementation is.. incomplete..

public virtual void Focus()
{
}

Oops.

Assert error on string.empty

Assert.Fail failed. Value assertion failed. Expected element [input.email:eq(0)] to have a value of [] but actual value is [].

email = string.Empty.

Perhaps it is trying to compare a null to a string.Empty

Unable to do Expect on input field

I.Enter("Jason").Quickly.In("#name");
I.Expect.This("Jason").In("#name");

Gives error Assert.Fail failed. Value assertion failed. Expected value of Jason but actual value is .

I.Expect.Value should be trimmed

Value assertion failed. Expected element [.success-message ] to have a value of [Successfully added] but actual value is [Successfully added ].

The expected value is stored in a resource file which trims values but the actual value is not trimmed. Actual value should be trimmed.

Quickly is missing from vNext

Hello,

we've tried out the version that is under development right now (brought down the codez, compiled and used it), and we're missing the Quickly-way of entering text. That is - no events firing.

Is this by design or has it slipped away

Hover doesn't work properly with Selenium

I.Hover('some-selector') isn't working properly on Selenium. The mouse moves, however, it doesn't appear to be scoping the hover in the context of the browser window.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.