ext.net - Selenium WebDriver Extjs sample code -
In a short time I will start automating the web site that contains the ext.net control. I actually tried to automate a simple scenario as a sample from the site Click & gt; Form & gt; Field Note & gt; Overview, but I could not manage to write text in simple note text box. Can you provide a code sample that is working? I tried to get XPath and other ways which can be used with the class. If I try to get all those inputs that I get, but SendKeys or Click Methods do not work. I get an exception that does not appear to be an element. Can you provide a code sample that is working?
IWebElement htmlElement = driver.FindElement (By.TagName ("html")); IList & LT; IWebElement & gt; InputList = htmlElement.FindElements (By.agName ("Input")); (I get all the info but I can not write the note ...)
I did Java in the following and you can easily convert it to C # if you choose. I use a utility method to correctly query for the correct element:
class Utils {public WebElement query (string component) {String query = componentQuery; String cmd = string Format ("Ext.ComponentQuery.query ('% s') [0]", query); String js = "return" + cmd + ".id;"; String ID = (string) ((javascript exclamation) driver). Exempt script (js); Return driver. Fund Element (BID); }} Then you can get your component here:
WebElement componentElement = Utils.query ("Your-ExtJS-Query- Component -goes- "+" inputEl "here) .; Component Element. SendKeys (valuesToSet)
Comments
Post a Comment