I am new to FlaUI and Robot Framework too. I am trying to automate windows application Outlook using FLAUi with Robot
I am having trouble understanding how can I use Name,Automation ID as locators.
For eg : NeW EMail in OUtlook has an xpath as : /Window[2]/Pane[3]/ToolBar/Pane/Pane/Pane/Pane/Pane/Group/Group1/Button
How can I have a path using Name or Automation ID (/MenuBar/MenuItem[#AutomationId=''])
I am using FLAUI Inspect and this is what I get :
FlaUI Inspect for New Email
Related
When following url is opened on browser window, I need to iterate list of web elements with xpath, .//div[#class = '_1AtVbE col-12-12'] and then for all the search results of mobile phones, I need to log the title & price of mobile search results.
How this use case can be done with karate ui automation?
I have administrator and front end section I have to upload a document in administrator eg-www.admin.com and moderate this document then it will display on frontend
Now we have to open new front end application in same session and validate correct data is displaying or not
Pls suggest
Uploading scenario cannot be done with selenium. You can use AutoIt to achieve it.
It is possible to open two different tabs and work with different Url in a single session.
Example(C#):
1. To open a new tab:
IWebElement body = driver.FindElement(By.TagName("body"));
body.SendKeys(Keys.Control + 't');
or
driver.ExecuteScript("window.open('your url','_blank');");
2.To switch between browser tabs: Get the window handle(window id's) of opened tabs by
var d =driver.WindowHandles;
3. To switch between browser tabs
driver.SwitchTo().Window(window-id);
If you do Web Interface tests with Java + Selenium, I advise you to use the NoraUi Open Source Framework.
This Framework manage multiple-application and multiple-data (user, manager, ...).
My goal is to automatically test an "register new user " webpage. When registering manually (without selenium) the result page has a different behavior than after registerering using the selenium script.
I use
foreach (var c in message) { target.SendKeys(c.ToString());}
to input the characters into the text fields.
It seems that somehow the framework the website is built on recognizes that a script is doing the registration. I wonder if there is any other way than using target.SendKeys to avoid a different behavior of the website when using selenim instead of manual testing.
Can you help me to identify element ID or any other locator of timeline composer in Facebook profile ?
I need this to use in Robot framework with selenium2library to post something on my wall.
I can log in to Facebook, navigate to profile, but I cant input text into timeline composer. I tried to use Click element before inserting text, but no success.
I am using "inspect element" in browsers/firebug add-on to identify elements.
In this case, unfortunately all locators I have tried giving errors like:
Element does not appear in 5 seconds
or
Element must be user editable in order to clear it
Non dynamic locator for FB timeline-composer has name "xhpc_message_text" (18.10.2016)
Input text name=xhpc_message_text test
I am creating a framework in selenium from scratch where i am scripting below scenarios:
1.Login in to https://www.yahoomail.com
2.entering username
3.entering password
4.click on Sign-In
5.click on Compose button
6.Enter Email ID, Subject and Message body.
Below is the code script i have written for above scenario:
WebDriver oYahoo = new FirefoxDriver();
oYahoo.get("http://www.yahoomail.com/");
oYahoo.manage().window().maximize();
oYahoo.findElement(By.xpath(".//*[#id='login-username']")).sendKeys("abcdefasdf#yahoo.com");
oYahoo.findElement(By.xpath(".//*[#id='login-passwd']")).sendKeys("sfgas234#123");
oYahoo.findElement(By.xpath(".//*[#id='login-signin']")).click();
oYahoo.findElement(By.xpath(".//*[#id='Compose']/button")).click();
oYahoo.findElement(By.xpath(".//*[#id='yui_3_16_0_1_1448364357109_2222']")).sendKeys("abcdefgh#gmail.com");
oYahoo.findElement(By.xpath(".//*[#id='subject-field']")).sendKeys("Hi This is my first automated mail");
oYahoo.findElement(By.xpath(".//*[#id='yui_3_16_0_1_1448364357109_1966']")).sendKeys("Hi This is my first automated mail");
oYahoo.findElement(By.xpath(".//*[#id='yui_3_16_0_1_1448364357109_2465']")).click();
oYahoo.quit();
Scripts fine till it clicks on "Compose" button, Once i get Mail editor, Script does not enters email-ID,Subject, and Message body.
What other action i should perform to achieve the same so that script will enter these parameters and can send a mail to particular user.
Do we need to create some class which will maps the locators to "compose-Email" screen?
If yes, how we can map/assign x-path to particular web element of Compose-Email page.
Thanks in Advance.
Well you should try by using the xpath and enter the required text. Something like this (it works for me)-
oYahoo.findElement(By.xpath(".//*[#id='to-field']")).sendKeys("xxxx#xxx.com");
oYahoo.findElement(By.xpath(".//*[#id='subject-field']")).sendKeys("My first automated email");
oYahoo.findElement(By.id("rtetext")).sendKeys("Hello....Hi....This is my first automated email");