How can selenium web driver get to know when the new window has opened and then resume its execution

You need to switch the control to pop-up window before doing any operations in it. By using this you can solve your problem. Before opening the popup window get the handle of main window and save it. String mwh=driver.getWindowHandle(); Now try to open the popup window by performing some action: driver.findElement(By.xpath(“”)).click(); Set s=driver.getWindowHandles(); //this method … Read more

TestNG dependsOnMethods from different class

Put the method in a group and use dependsOnGroups. class c1 { @Test(groups={“c1.verifyConfig”}) public void verifyConfig() { //verify some test config parameters } } class c2 { @Test(dependsOnGroups={“c1.verifyConfig”}) public void dotest() { //Actual test } } It is recommended to verify configuration in a @Before* and throw if something goes wrong there so the tests … Read more

Run Tensorflow unit tests

The easiest way to run the TensorFlow unit tests is using Bazel, assuming you have downloaded the source from Git: # All tests (for C++ changes). $ bazel test //tensorflow/… # All Python tests (for Python front-end changes). $ bazel test //tensorflow/python/… # All tests (with GPU support). $ bazel test -c opt –config=cuda //tensorflow/… … Read more

Is it acceptable to write a “Given When Then When Then” test in Gherkin?

It depends on the target audience of the feature as written. It seems highly likely that the gherkin you’ve got there was not written with a stakeholder (i.e. somebody not-techie but has a vested interest in the business and the website). BDD is really about the conversation about requirements and expectations – and Gherkin is … Read more

Testing custom admin actions in django

Just pass the parameter action with the action name. response = client.post(change_url, {‘action’: ‘mark_as_read’, …}) Checked items are passed as _selected_action parameter. So code will be like this: fixtures = [MyModel.objects.create(read=False), MyModel.objects.create(read=True)] should_be_untouched = MyModel.objects.create(read=False) #note the unicode() call below data = {‘action’: ‘mark_as_read’, ‘_selected_action’: [unicode(f.pk) for f in fixtures]} response = client.post(change_url, data)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)