adspace


how to write test case for GUI testing and tell me in brief
about GUI and all related WEB based testing..if possible
then pls give example of its test case...m new in
testing........thannx for help in advance

Answer Posted / Nirupma Mishra

To write GUI (Graphical User Interface) test cases, you can use various tools such as Selenium WebDriver for web-based applications, Appium for mobile applications, or TestComplete for desktop applications. Here is a brief overview of GUI and related web testing:n
1. GUI: A graphical user interface allows users to interact with software through visual elements like buttons, menus, dialog boxes, and windows.
2. Web-based testing: Testing web applications on various browsers and devices to ensure compatibility, usability, functionality, and performance.nnFor an example test case using Selenium, consider a simple login page with username and password fields:nn```javanimport org.openqa.selenium.*;nimport org.openqa.selenium.firefox.*;nnpublic class LoginTest {n public static void main(String[] args) {n WebDriver driver = new FirefoxDriver();n String baseUrl = "http://example.com/";nsystem.setProperty("webdriver.gecko.driver", "/path/to/geckodriver");ndriver.get(baseUrl + "login.html");nWebElement usernameField = driver.findElement(By.name("username"));nWebElement passwordField = driver.findElement(By.name("password"));nWebElement loginButton = driver.findElement(By.id("login-button"));nn// Enter the correct username and passwordnusernameField.sendKeys("testuser");npasswordField.sendKeys("testpassword");nn// Click on the login buttonnloginButton.click();n}n}```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can someone tell me the test cases to test the password for with following scenario: 1. Password should be minimum 6 chars and maximum 8 chars. 2. Password should consist one uppercase letter 3. Password should consist of one numeric 4. Password should consist of one special character.

2217


What is the toughest moment you faced in your testing carrier in which everyone praised you?

2336


Positive and Negative test cases for the speedometer?(minimum 5 each)

2989


Can anybody help me in writing test cases for a scenario? need help at the earliest. will send you the requirement doc to your email id. thanks raj

2407


pls i want test cases for oss? whts the process of oss testing

2646


# A large IT company is in the process of revising salary structure for its employees. The salary will be on the basis of assessed performance of the previous year for all employee who have completed six months or more. # The rules for salary revision are provided below :- Performance level 1 : Increase existing salary by 30% Performance level 2 : Increase existing salary by 20% Performance level 3 : Increase existing salary by 10% Performance level 4 : Increase existing salary by 5% Performance level 5 : No Increase # For those who have not completed six months, provide a flat increase of 7.5% in their salary. In addition to above provide a special loyalty allowance of Tk. 800 to all employees who have complete THREE years with the organization. # Compute the minimum number of paths that you would require to cover the application and how many test cases would you require?

2690


In any Hyderabd institute you can find these word commomly used by faculties ... Yes or no / Right or wrong so funny...

2297


hai im finished software testing course im technicaly strong but yet now no opportunities come to me.if any opportunities please send to my mail id my mail di is sumathi11685@gmail.com

2360


Can any one send me the Sample sanity Test Cases??? Mail id:veerabhadrudu.p@gmail.com

3892