Tuesday, June 2, 2020
How to find element inside iframe or not using selenium
Int size = driver.findElements(By.tagName("iframe")).size();
- driver.switchTo().frame(0);
- driver.switchTo().frame(1);
for(int i=0; i<=size; i++){
driver.switchTo().frame(i);
int total=driver.findElements(By.xpath("html/body/a/img")).size();
AutoIt :How to use AutoIt selenium java
1) install autoit.
2) open finder tool -- finding controls.
3) open scite --(like IDE)
4) write code---controlfous,controlsettext,controlclick
5) save it
6) compile and generate exe.
7) // below line execute the AutoIT script .
Runtime.getRuntime().exec("E:\\AutoIT\\FileUpload.exe");
2) open finder tool -- finding controls.
3) open scite --(like IDE)
4) write code---controlfous,controlsettext,controlclick
5) save it
6) compile and generate exe.
7) // below line execute the AutoIT script .
Runtime.getRuntime().exec("E:\\AutoIT\\FileUpload.exe");
AutoIT : How to use AutoIt selenium c#
- IWebDriver driver = new InternetExplorerDriver();
- driver.Navigate().GoToUrl("http://localhost/Home/StephenSecrets");
- //Thread.Sleep(500); //if required
- AutoItX.WinWaitActive("Windows Security");
- AutoItX.ControlSetText("Windows Security", "", "Edit1", "TestUser"); //replace testuser with actual username (with domain if required)
- AutoItX.ControlSetText("Windows Security", "", "Edit2", "Password_test"); //replace Password_test with actual Password
- AutoItX.Send("{ENTER}");
Monday, June 1, 2020
The important few steps to build a successful testing career.
- Don’t be afraid on pressing any button from the app that you are testing , it will not cause any harm.
- Document your work , and here this will include to have tasks for every testing activity , test cases if possible manageable in a tool like (Test link or Test rail).
- Be passionate in what are you doing and don’t compromise the quality of the product.
- Put yourself in the end user skin.
- Build test reports and share them with your team.
- Keep your test cases up to date
- Review your test cases with your product owner , to make sure you are always testing the right thing
- Be open to suggestions
- Try to automate your tests so you can speed up your test execution and you’ll be able to spent more time in exploratory testing
Javascrpirt in selenium
WebElement webElement = driver.findElement(By.xpath("xpath_element"));
JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;
javaScriptExecutor.executeScript("arguments[0].click()", webElement);
javaScriptExecutor.ExecuteScript("return jQuery.active == 0")
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("return document.readyState").toString().equals("complete");
Subscribe to:
Posts (Atom)