Tag Info

New answers tagged

0

Use the Actions object to open a new tab. Perform a action who press and hold the ctrl key and after that press the t key. After that release all keys. ctrl and t is the shortcut to open a new tab in the most browsers. To switch between the tabs you use the following shortcut: ctrl and TAB.


0

This should work: class Hull { protected WebDriver driver; @BeforeMethod public void initializeDriver() { // Initialize the driver here. } } class ClassWithTestMethods extends Hull { // Test methods with @Test annotation. // Use the driver variable of Hull in the test methods. } The initializeDriver method should always ...


0

I did this by following code. import java.util.Properties; import javax.activation.*; import javax.mail.*; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; public class emailReport { public static void main(String[] args) { final ...


0

Instead of simple System.out.println (last line in your example) try out the following: PrintStream out = new PrintStream(System.out, true, "UTF-8"); out.println("Currency Selected:" +select.getText());


1

Approach 1 Create a class, for example Hull. In the cass is a protected variable WebDriver driver. In the class is a method setup() with a @Before annotation. In the method you has a condition: Is WebDriver null, initialize; else do nothing. Classes with test cases extends from Hull. Classes with test cases can use the variable driver. Approach 2 ...


1

Like Josa Pita says, that is nothing for testing frameworks itself. The developers could write a script to save the current version of the DB. The process should look like that: Save current version of DB/any kind of data storage. Start test run. After test run finished restore the saved version of the DB/any kind of data storage. But I think it is ...


0

In our application we are using web-services and DB, is it possible to integrate Selenium webdriver with web-services (Soap UI)? Since this is in Java, yes it is possible to interact with SoapUI using the test runner or by importing SoapUI into Java and running it as a background task. If two different frameworks are integrated, whether this is ...


1

When you run your TCs through TestNG, a test-output folder is created, which contains a file with name emailable-report.html, so basically you need to send that file as an attachment to the stakeholders. Here I've considered the fact that your localhost is configured to send emails. Please find below the code that you can use. import java.util.*; import ...


0

From what I understand from your question, you want to delete the records of the actions you made on your app? This has nothing to do with selenium or testng, you need to have an app for tests only, with a clean DB, that you can delete the records from your actions. Is this helpful?


0

TestNG provide a lot of annotations for thinks like that: @BeforeTest, @BeforeSuite, BeforeGroups and more: http://testng.org/doc/documentation-main.html#annotations It may be look like that: @BeforeTest public void setup() { // open your popup and click on the link } @Test public void test() { // test case } @AfterTest public void tearDown() { ...



Top 50 recent answers are included